/// <summary> /// Instantiates the filter where only the character ranges specified by <paramref name="allowedRanges"/> /// are allowed by the filter. /// </summary> public TextEncoderSettings(params UnicodeRange[] allowedRanges) { if (allowedRanges == null) { throw new ArgumentNullException(nameof(allowedRanges)); } _allowedCharactersBitmap = AllowedCharactersBitmap.CreateNew(); AllowRanges(allowedRanges); }
/// <summary> /// Instantiates the filter by cloning the allow list of another <see cref="TextEncoderSettings"/>. /// </summary> public TextEncoderSettings(TextEncoderSettings other) { _allowedCharactersBitmap = AllowedCharactersBitmap.CreateNew(); AllowCodePoints(other.GetAllowedCodePoints()); }
/// <summary> /// Instantiates an empty filter (allows no code points through by default). /// </summary> public TextEncoderSettings() { _allowedCharactersBitmap = AllowedCharactersBitmap.CreateNew(); }