MetadataStringDecoder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the MetadataReader with a custom mechanism for decoding byte sequences in metadata that represent text.
public ref class MetadataStringDecoder
public class MetadataStringDecoder
type MetadataStringDecoder = class
Public Class MetadataStringDecoder
- Inheritance
-
MetadataStringDecoder
Remarks
This type can be used as follows:
To customize the treatment of invalid input. When no decoder is provided, the MetadataReader uses the default fallback replacement with
\uFFFD
.To reuse existing strings instead of allocating a new one for each decoding operation.
Constructors
MetadataStringDecoder(Encoding) |
Initializes a new instance of the MetadataStringDecoder class using the given encoding. |
Properties
DefaultUTF8 |
Gets the default decoder used by MetadataReader to decode UTF-8 when no decoder is provided to the constructor. |
Encoding |
Gets the encoding used by this instance. |
Methods
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetString(Byte*, Int32) |
Obtains strings for byte sequences in metadata. Override this to cache strings if required. Otherwise, it is implemented by forwarding straight to Encoding and every call will allocate a new string. |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |