/// <summary> /// Instantiates the filter by cloning the allow list of another <see cref="ICodePointFilter"/>. /// </summary> public CodePointFilter(ICodePointFilter other) { CodePointFilter otherAsCodePointFilter = other as CodePointFilter; if (otherAsCodePointFilter != null) { _allowedCharsBitmap = otherAsCodePointFilter.GetAllowedCharsBitmap(); } else { _allowedCharsBitmap = AllowedCharsBitmap.CreateNew(); AllowFilter(other); } }
/// <summary> /// Instantiates the filter where only the character ranges specified by <paramref name="allowedRanges"/> /// are allowed by the filter. /// </summary> public CodePointFilter(params UnicodeRange[] allowedRanges) { _allowedCharsBitmap = AllowedCharsBitmap.CreateNew(); AllowRanges(allowedRanges); }
/// <summary> /// Instantiates an empty filter (allows no code points through by default). /// </summary> public CodePointFilter() { _allowedCharsBitmap = AllowedCharsBitmap.CreateNew(); }