示例#1
0
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public JavaScriptStringEncoder(ICodePointFilter filter)
     : this(new JavaScriptStringUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
     if (filter == null)
     {
         throw new ArgumentNullException(nameof(filter));
     }
 }
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public HtmlEncoder(ICodePointFilter filter)
     : this(new HtmlUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
     if (filter == null)
     {
         throw new ArgumentNullException(nameof(filter));
     }
 }
示例#3
0
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public HtmlEncoderOld(ICodePointFilter filter)
     : this(new HtmlUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
 }
示例#4
0
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public JavaScriptStringEncoderOld(ICodePointFilter filter)
     : this(new JavaScriptStringUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
 }
示例#5
0
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public UrlEncoder([NotNull] ICodePointFilter filter)
     : this(new UrlUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
 }
示例#6
0
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public UrlEncoderOld(CodePointFilter filter)
     : this(new UrlUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
 }