Method TextEncoding
TextEncoding(Encoding, params ReadOnlySpan<string>)
Creates a FileFormat that validates files decode successfully using the specified Encoding, for the specified extensions.
Declaration
public static FileFormat TextEncoding(Encoding encoding, params ReadOnlySpan<string> extensions)
Parameters
| Type | Name | Description |
|---|---|---|
| Encoding | encoding | The encoding to validate against. The encoding will be used with strict decoding enabled, so invalid byte sequences will cause validation to fail. |
| ReadOnlySpan<string> | extensions | The file extensions (including the leading dot) this file format applies to. Must contain at least one entry. The first extension is the PrimaryExtension that all other extensions are normalized to. |
Returns
| Type | Description |
|---|---|
| FileFormat |