.NET CIL Browser - CilBrowser.Core

Type: CilBrowser.Core.HtmlBuilder

Types in CilBrowser.Core namespace:

AssemblyServer

CilBrowserOptions

FileUtils

HtmlAttribute

HtmlBuilder

HtmlGenerator

ServerBase

SourceServer

Utils

WebsiteGenerator

.class public auto ansi beforefieldinit CilBrowser.Core.HtmlBuilder
extends [netstandard]System.Object
{

 .field private class [netstandard]System.IO.TextWriter wr
 .field private static initonly class CilBrowser.Core.HtmlAttribute[] NoAttributes

 .method public hidebysig specialname rtspecialname instance void .ctor(
     class [netstandard]System.IO.TextWriter target
 ) cil managed
 {
  .maxstack  8

           ldarg.0      
           call         instance void [netstandard]System.Object::.ctor()
           nop          
           nop          
           ldarg.0      
           ldarg.1      
           stfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ret          
 }

 .method public hidebysig specialname rtspecialname instance void .ctor(
     class [netstandard]System.Text.StringBuilder sb
 ) cil managed
 {
  .maxstack  8

           ldarg.0      
           call         instance void [netstandard]System.Object::.ctor()
           nop          
           nop          
           ldarg.0      
           ldarg.1      
           newobj       instance void [netstandard]System.IO.StringWriter::.ctor(class [netstandard]System.Text.StringBuilder)
           stfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ret          
 }

 .method private hidebysig specialname rtspecialname static void .cctor() cil managed
 {
  .maxstack  8

           ldc.i4.0     
           newarr       CilBrowser.Core.HtmlAttribute
           stsfld       class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::NoAttributes
           ret          
 }

 .method public hidebysig static class CilBrowser.Core.HtmlAttribute[] OneAttribute(
     string name, 
     string val
 ) cil managed
 {
  .maxstack  4
  .locals  init (class CilBrowser.Core.HtmlAttribute[] V_0,
     class CilBrowser.Core.HtmlAttribute[] V_1)

           nop          
           ldc.i4.1     
           newarr       CilBrowser.Core.HtmlAttribute
           stloc.0      
           ldloc.0      
           ldc.i4.0     
           ldarg.0      
           ldarg.1      
           newobj       instance void CilBrowser.Core.HtmlAttribute::.ctor(string, string)
           stelem.ref   
           ldloc.0      
           stloc.1      
           br.s         IL_0001
  IL_0001: ldloc.1      
           ret          
 }

 .method public hidebysig instance void WriteRaw(
     string s
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldarg.1      
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteEscaped(
     string s
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldarg.1      
           call         string [netstandard]System.Net.WebUtility::HtmlEncode(string)
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ret          
 }

 .method private hidebysig instance void WriteAttributes(
     class CilBrowser.Core.HtmlAttribute[] attributes
 ) cil managed
 {
  .maxstack  3
  .locals  init (int32 V_0,
     string V_1,
     bool V_2,
     bool V_3)

           nop          
           ldc.i4.0     
           stloc.0      
           br.s         IL_0003
  IL_0001: nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     32
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldarg.1      
           ldloc.0      
           ldelem.ref   
           callvirt     instance string CilBrowser.Core.HtmlAttribute::get_Name()
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ldarg.1      
           ldloc.0      
           ldelem.ref   
           callvirt     instance string CilBrowser.Core.HtmlAttribute::get_Value()
           stloc.1      
           ldloc.1      
           ldnull       
           ceq          
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0002
           ldsfld       string [netstandard]System.String::Empty
           stloc.1      
  IL_0002: ldloc.1      
           call         string [netstandard]System.Net.WebUtility::HtmlEncode(string)
           stloc.1      
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     61
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     34
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldloc.1      
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     34
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           nop          
           ldloc.0      
           ldc.i4.1     
           add          
           stloc.0      
  IL_0003: ldloc.0      
           ldarg.1      
           ldlen        
           conv.i4      
           clt          
           stloc.3      
           ldloc.3      
           brtrue       IL_0001
           ret          
 }

 .method public hidebysig instance void WriteTagStart(
     string name, 
     class CilBrowser.Core.HtmlAttribute[] attributes
 ) cil managed
 {
  .maxstack  2
  .locals  init (bool V_0)

           nop          
           ldarg.2      
           ldnull       
           ceq          
           stloc.0      
           ldloc.0      
           brfalse.s    IL_0001
           ldc.i4.0     
           newarr       CilBrowser.Core.HtmlAttribute
           starg.s      2
  IL_0001: ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     60
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldarg.1      
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ldarg.0      
           ldarg.2      
           call         instance void CilBrowser.Core.HtmlBuilder::WriteAttributes(class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     62
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteTagStart(
     string name
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldarg.1      
           ldsfld       class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::NoAttributes
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ret          
 }

 .method public hidebysig instance void WriteTagEnd(
     string name
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     60
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     47
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldarg.1      
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     62
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteTag(
     string name, 
     string content
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldarg.1      
           ldarg.2      
           ldsfld       class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::NoAttributes
           ldc.i4.0     
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[], bool)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteTag(
     string name, 
     string content, 
     class CilBrowser.Core.HtmlAttribute[] attributes
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldarg.1      
           ldarg.2      
           ldarg.3      
           ldc.i4.0     
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[], bool)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteTag(
     string name, 
     string content, 
     class CilBrowser.Core.HtmlAttribute[] attributes, 
     bool isRaw
 ) cil managed
 {
  .maxstack  2
  .locals  init (string V_0,
     bool V_1,
     bool V_2,
     bool V_3,
     bool V_4)

           nop          
           ldarg.2      
           ldnull       
           ceq          
           stloc.1      
           ldloc.1      
           brfalse.s    IL_0001
           ldsfld       string [netstandard]System.String::Empty
           starg.s      2
  IL_0001: ldarg.3      
           ldnull       
           ceq          
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0002
           ldc.i4.0     
           newarr       CilBrowser.Core.HtmlAttribute
           starg.s      3
  IL_0002: ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     60
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldarg.1      
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ldarg.0      
           ldarg.3      
           call         instance void CilBrowser.Core.HtmlBuilder::WriteAttributes(class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldarg.2      
           callvirt     instance int32 [netstandard]System.String::get_Length()
           ldc.i4.0     
           ceq          
           stloc.3      
           ldloc.3      
           brfalse.s    IL_0003
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     47
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     62
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           br.s         IL_0005
  IL_0003: ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldc.i4.s     62
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(char)
           nop          
           ldarg.2      
           stloc.0      
           ldarg.s      isRaw
           ldc.i4.0     
           ceq          
           stloc.s      V_4
           ldloc.s      V_4
           brfalse.s    IL_0004
           ldloc.0      
           call         string [netstandard]System.Net.WebUtility::HtmlEncode(string)
           stloc.0      
  IL_0004: ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           ldloc.0      
           callvirt     instance void [netstandard]System.IO.TextWriter::Write(string)
           nop          
           ldarg.0      
           ldarg.1      
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
  IL_0005: ret          
 }

 .method public hidebysig instance void WriteHyperlink(
     string url, 
     string text
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldstr        "a"
           ldarg.2      
           ldc.i4.1     
           newarr       CilBrowser.Core.HtmlAttribute
           dup          
           ldc.i4.0     
           ldstr        "href"
           ldarg.1      
           newobj       instance void CilBrowser.Core.HtmlAttribute::.ctor(string, string)
           stelem.ref   
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ret          
 }

 .method public hidebysig instance void WriteHyperlink(
     string url, 
     string text, 
     class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.HtmlAttribute> attrs
 ) cil managed
 {
  .maxstack  4
  .locals  init (class [netstandard]System.Collections.Generic.List`1<class CilBrowser.Core.HtmlAttribute> V_0,
     class [netstandard]System.Collections.Generic.IEnumerator`1<class CilBrowser.Core.HtmlAttribute> V_1,
     class CilBrowser.Core.HtmlAttribute V_2)

           nop          
           newobj       instance void class [netstandard]System.Collections.Generic.List`1<class CilBrowser.Core.HtmlAttribute>::.ctor()
           stloc.0      
           ldloc.0      
           ldstr        "href"
           ldarg.1      
           newobj       instance void CilBrowser.Core.HtmlAttribute::.ctor(string, string)
           callvirt     instance void class [netstandard]System.Collections.Generic.List`1<class CilBrowser.Core.HtmlAttribute>::Add(!0)
           nop          
           nop          
           ldarg.3      
           callvirt     instance class [netstandard]System.Collections.Generic.IEnumerator`1<!0> class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.HtmlAttribute>::GetEnumerator()
           stloc.1      
  .try
  {
            br.s         IL_0002
   IL_0001: ldloc.1      
            callvirt     instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1<class CilBrowser.Core.HtmlAttribute>::get_Current()
            stloc.2      
            ldloc.0      
            ldloc.2      
            callvirt     instance void class [netstandard]System.Collections.Generic.List`1<class CilBrowser.Core.HtmlAttribute>::Add(!0)
            nop          
   IL_0002: ldloc.1      
            callvirt     instance bool [netstandard]System.Collections.IEnumerator::MoveNext()
            brtrue.s     IL_0001
            leave.s      IL_0004
  }
  finally
  {
            ldloc.1      
            brfalse.s    IL_0003
            ldloc.1      
            callvirt     instance void [netstandard]System.IDisposable::Dispose()
            nop          
   IL_0003: endfinally   
  }
  IL_0004: ldarg.0      
           ldstr        "a"
           ldarg.2      
           ldloc.0      
           callvirt     instance !0[] class [netstandard]System.Collections.Generic.List`1<class CilBrowser.Core.HtmlAttribute>::ToArray()
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ret          
 }

 .method public hidebysig instance void StartParagraph() cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldstr        "p"
           ldsfld       class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::NoAttributes
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ret          
 }

 .method public hidebysig instance void EndParagraph() cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldstr        "p"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteParagraph(
     string text
 ) cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldstr        "p"
           ldsfld       class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::NoAttributes
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldarg.0      
           ldarg.1      
           call         instance void CilBrowser.Core.HtmlBuilder::WriteEscaped(string)
           nop          
           ldarg.0      
           ldstr        "p"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ret          
 }

 .method public hidebysig instance void WriteLineBreak() cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldstr        "br"
           ldsfld       string [netstandard]System.String::Empty
           ldsfld       class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::NoAttributes
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ret          
 }

 .method public hidebysig instance void StartDocument(
     string title, 
     string style
 ) cil managed
 {
  .maxstack  3

           nop          
           ldarg.0      
           ldstr        "html"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.0      
           ldstr        "head"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.0      
           ldstr        "title"
           ldarg.1      
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string)
           nop          
           ldarg.0      
           ldstr        "style"
           ldarg.2      
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string)
           nop          
           ldarg.0      
           ldstr        "head"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           callvirt     instance void [netstandard]System.IO.TextWriter::WriteLine()
           nop          
           ldarg.0      
           ldstr        "body"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ret          
 }

 .method public hidebysig instance void EndDocument() cil managed
 {
  .maxstack  8

           nop          
           ldarg.0      
           ldfld        class [netstandard]System.IO.TextWriter CilBrowser.Core.HtmlBuilder::wr
           callvirt     instance void [netstandard]System.IO.TextWriter::WriteLine()
           nop          
           ldarg.0      
           ldstr        "body"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.0      
           ldstr        "html"
           call         instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ret          
 }

}

Back to table of contents


Generated by CIL Browser