<PackageReference Include="System.Text.Encodings.Web" Version="10.0.0-preview.1.25080.5" />

TextEncoderSettings

public class TextEncoderSettings
Represents a filter that allows only certain Unicode code points.

Instantiates an empty filter (allows no code points through by default).

Instantiates a filter by cloning the allowed list of another TextEncoderSettings object.

public TextEncoderSettings(UnicodeRange[] allowedRanges)

Instantiates a filter where only the character ranges specified by allowedRanges are allowed by the filter.

public virtual void AllowCharacter(char character)

Allows the character specified by character through the filter.

public virtual void AllowCharacters(char[] characters)

Allows all characters specified by characters through the filter.

public virtual void AllowCodePoints(IEnumerable<int> codePoints)

Allows all code points specified by codePoints.

public virtual void AllowRange(UnicodeRange range)

Allows all characters specified by range through the filter.

public virtual void AllowRanges(UnicodeRange[] ranges)

Allows all characters specified by ranges through the filter.

public virtual void Clear()

Resets this object by disallowing all characters.

public virtual void ForbidCharacter(char character)

Disallows the character character through the filter.

public virtual void ForbidCharacters(char[] characters)

Disallows all characters specified by characters through the filter.

public virtual void ForbidRange(UnicodeRange range)

Disallows all characters specified by range through the filter.

public virtual void ForbidRanges(UnicodeRange[] ranges)

Disallows all characters specified by ranges through the filter.

public virtual IEnumerable<int> GetAllowedCodePoints()

Gets an enumerator of all allowed code points.