Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 /// <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());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Instantiates an empty filter (allows no code points through by default).
 /// </summary>
 public TextEncoderSettings()
 {
     _allowedCharactersBitmap = AllowedCharactersBitmap.CreateNew();
 }