Exemple #1
0
 internal void AppendHtml(StringBuilder sb, HtmlWriterSettings settings)
 {
     sb.Append(Name)
     .Append("=\"")
     .Append(HtmlEncoder.Escape(Value, settings.Charset.GetEncoder(), settings.EscapeMode))
     .Append("\"");
 }
 public OuterHtmlNodeVisitor(StringBuilder accum, bool xml = false)
 {
     _output   = accum;
     _settings = new HtmlWriterSettings {
         IndentWidth = 1,
     };
     _tokens = xml ? Tokens.Xml : Tokens.Html;
 }
Exemple #3
0
 public static HtmlWriterSettings ReadOnly(HtmlWriterSettings settings)
 {
     if (settings == null)
     {
         throw new ArgumentNullException(nameof(settings));
     }
     return((HtmlWriterSettings)settings.CloneReadOnly());
 }
Exemple #4
0
 public HtmlWriterSettings(HtmlWriterSettings settings)
 {
     if (settings != null)
     {
         IsXhtml     = settings.IsXhtml;
         Charset     = settings.Charset;
         EscapeMode  = settings.EscapeMode;
         Indent      = settings.Indent;
         IndentWidth = settings.IndentWidth;
     }
 }