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