DecoderValidationFallback Class

Provides a failure-handling mechanism, called a fallback, for an encoded input byte sequence that cannot be converted to an output character. The fallback emits a replacement character � (U+FFFD, "REPLACEMENT CHARACTER") instead of a decoded input byte sequence and informs in its property HasError whether an error has occurred.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
C#
public sealed class DecoderValidationFallback : DecoderFallback
Inheritance
Object    DecoderFallback    DecoderValidationFallback

Remarks

Use DecoderValidationFallback objects with the methods

The DecoderValidationFallback object is passed as a DecoderFallback object.

The DecoderValidationFallback class behaves like the DecoderReplacementFallback class, except that it informs after use in its HasError property whether an error has occurred. To evaluate the property, You should keep a reference to the DecoderValidationFallback object or cast the return value of the Encoding.DecoderFallback property to the Type DecoderValidationFallback.

When using the DecoderValidationFallback object multiple times, the Reset method can be called to reset the HasError property.

Constructors

DecoderValidationFallbackInitializes a new instance of the DecoderValidationFallback class

Properties

HasErrorIndicates whether a decoding error occurred.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Reset Resets the HasError property to its initial value false.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also