.NET CIL Browser - CilBrowser.Core

Type: CilBrowser.Core.WebsiteGenerator

Types in CilBrowser.Core namespace:

AssemblyServer

CilBrowserOptions

FileUtils

HtmlAttribute

HtmlBuilder

HtmlGenerator

ServerBase

SourceServer

Utils

WebsiteGenerator

.class public abstract auto ansi sealed beforefieldinit CilBrowser.Core.WebsiteGenerator
extends [netstandard]System.Object
{

 .method public hidebysig static void GenerateFromAssembly(
     class [netstandard]System.Reflection.Assembly ass, 
     string nsFilter, 
     string outputPath, 
     string customFooter
 ) cil managed
 {
  .maxstack  4
  .locals  init (class CilBrowser.Core.HtmlGenerator V_0,
     string V_1,
     class [netstandard]System.Text.StringBuilder V_2,
     class CilBrowser.Core.HtmlBuilder V_3,
     class [netstandard]System.Reflection.AssemblyName V_4,
     class [netstandard]System.Type[] V_5,
     class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> V_6,
     string[] V_7,
     bool V_8,
     int32 V_9,
     string V_10,
     class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type> V_11,
     bool V_12,
     bool V_13,
     bool V_14,
     bool V_15,
     valuetype [netstandard]System.Reflection.BindingFlags V_16,
     bool V_17,
     bool V_18,
     int32 V_19,
     string V_20,
     class [netstandard]System.NotSupportedException V_21,
     bool V_22,
     bool V_23,
     bool V_24)

           nop          
           ldarg.0      
           ldarg.1      
           ldarg.3      
           newobj       instance void CilBrowser.Core.HtmlGenerator::.ctor(class [netstandard]System.Reflection.Assembly, string, string)
           stloc.0      
           ldarg.2      
           call         class [netstandard]System.IO.DirectoryInfo [netstandard]System.IO.Directory::CreateDirectory(string)
           pop          
           ldloc.0      
           ldarg.0      
           callvirt     instance string CilBrowser.Core.HtmlGenerator::VisualizeAssemblyManifest(class [netstandard]System.Reflection.Assembly)
           stloc.1      
           ldarg.2      
           ldstr        "assembly.html"
           call         string [netstandard]System.IO.Path::Combine(string, string)
           ldloc.1      
           call         class [netstandard]System.Text.Encoding [netstandard]System.Text.Encoding::get_UTF8()
           call         void [netstandard]System.IO.File::WriteAllText(string, string, class [netstandard]System.Text.Encoding)
           nop          
           ldc.i4       1000
           newobj       instance void [netstandard]System.Text.StringBuilder::.ctor(int32)
           stloc.2      
           ldloc.2      
           newobj       instance void CilBrowser.Core.HtmlBuilder::.ctor(class [netstandard]System.Text.StringBuilder)
           stloc.3      
           ldarg.0      
           callvirt     instance class [netstandard]System.Reflection.AssemblyName [netstandard]System.Reflection.Assembly::GetName()
           stloc.s      V_4
           ldstr        "Generating website for "
           ldloc.s      V_4
           callvirt     instance string [netstandard]System.Reflection.AssemblyName::get_Name()
           call         string [netstandard]System.String::Concat(string, string)
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           ldarg.1      
           call         bool [netstandard]System.String::IsNullOrEmpty(string)
           ldc.i4.0     
           ceq          
           stloc.s      V_8
           ldloc.s      V_8
           brfalse.s    IL_0001
           ldstr        "Namespace filter: "
           ldarg.1      
           call         string [netstandard]System.String::Concat(string, string)
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
  IL_0001: ldstr        "Output path: "
           ldarg.2      
           call         string [netstandard]System.String::Concat(string, string)
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           ldloc.3      
           ldarg.0      
           call         void CilBrowser.Core.HtmlGenerator::WriteTocStart(class CilBrowser.Core.HtmlBuilder, class [netstandard]System.Reflection.Assembly)
           nop          
           ldarg.0      
           callvirt     instance class [netstandard]System.Type[] [netstandard]System.Reflection.Assembly::GetTypes()
           stloc.s      V_5
           ldloc.s      V_5
           call         class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> CilBrowser.Core.Utils::GroupByNamespace(class [netstandard]System.Type[])
           stloc.s      V_6
           ldloc.s      V_6
           callvirt     instance class [netstandard]System.Collections.Generic.Dictionary`2/KeyCollection<!0, !1> class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>>::get_Keys()
           call         !!0[] [netstandard]System.Linq.Enumerable::ToArray<string>(class [netstandard]System.Collections.Generic.IEnumerable`1<!!0>)
           stloc.s      V_7
           ldloc.s      V_7
           call         void [netstandard]System.Array::Sort<string>(!!0[])
           nop          
           ldc.i4.0     
           stloc.s      V_9
           br           IL_0018
  IL_0002: nop          
           ldloc.s      V_7
           ldloc.s      V_9
           ldelem.ref   
           stloc.s      V_10
           ldarg.1      
           call         bool [netstandard]System.String::IsNullOrEmpty(string)
           ldc.i4.0     
           ceq          
           stloc.s      V_12
           ldloc.s      V_12
           brfalse.s    IL_0004
           nop          
           ldloc.s      V_10
           ldarg.1      
           call         bool CilBrowser.Core.Utils::StrEquals(string, string)
           ldc.i4.0     
           ceq          
           stloc.s      V_13
           ldloc.s      V_13
           brfalse.s    IL_0003
           br           IL_0017
  IL_0003: nop          
  IL_0004: ldloc.s      V_6
           ldloc.s      V_7
           ldloc.s      V_9
           ldelem.ref   
           callvirt     instance !1 class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>>::get_Item(!0)
           stloc.s      V_11
           ldloc.s      V_11
           callvirt     instance int32 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Count()
           ldc.i4.0     
           ceq          
           stloc.s      V_14
           ldloc.s      V_14
           brfalse.s    IL_0005
           br           IL_0017
  IL_0005: ldloc.s      V_11
           callvirt     instance int32 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Count()
           ldc.i4.1     
           ceq          
           stloc.s      V_15
           ldloc.s      V_15
           brfalse.s    IL_0009
           nop          
           ldc.i4.s     60
           stloc.s      V_16
           ldloc.s      V_11
           ldc.i4.0     
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           callvirt     instance string [netstandard]System.Type::get_FullName()
           ldstr        "<Module>"
           call         bool CilBrowser.Core.Utils::StrEquals(string, string)
           brfalse.s    IL_0006
           ldloc.s      V_11
           ldc.i4.0     
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           ldloc.s      V_16
           callvirt     instance class [netstandard]System.Reflection.FieldInfo[] [netstandard]System.Type::GetFields(valuetype [netstandard]System.Reflection.BindingFlags)
           ldlen        
           brtrue.s     IL_0006
           ldloc.s      V_11
           ldc.i4.0     
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           ldloc.s      V_16
           callvirt     instance class [netstandard]System.Reflection.MethodInfo[] [netstandard]System.Type::GetMethods(valuetype [netstandard]System.Reflection.BindingFlags)
           ldlen        
           ldc.i4.0     
           ceq          
           br.s         IL_0007
  IL_0006: ldc.i4.0     
  IL_0007: stloc.s      V_17
           ldloc.s      V_17
           brfalse.s    IL_0008
           nop          
           br           IL_0017
  IL_0008: nop          
  IL_0009: ldloc.s      V_10
           call         bool [netstandard]System.String::IsNullOrEmpty(string)
           stloc.s      V_18
           ldloc.s      V_18
           brfalse.s    IL_0010
           ldstr        "(No namespace)"
           stloc.s      V_10
           br.s         IL_0011
  IL_0010: ldloc.s      V_10
           ldstr        " namespace"
           call         string [netstandard]System.String::Concat(string, string)
           stloc.s      V_10
  IL_0011: ldloc.3      
           ldstr        "h2"
           ldloc.s      V_10
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string)
           nop          
           ldc.i4.0     
           stloc.s      V_19
           br           IL_0016
  IL_0012: nop          
  .try
  {
            nop          
            ldloc.0      
            ldloc.s      V_11
            ldloc.s      V_19
            callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
            ldloc.s      V_6
            callvirt     instance string CilBrowser.Core.HtmlGenerator::VisualizeType(class [netstandard]System.Type, class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>>)
            stloc.1      
            nop          
            leave.s      IL_0013
  }
  catch [netstandard]System.NotSupportedException
  {
            stloc.s      V_21
            nop          
            ldloc.s      V_21
            call         string CilBrowser.Core.HtmlGenerator::VisualizeException(class [netstandard]System.Exception)
            stloc.1      
            ldstr        "Failed to generate HTML for "
            ldloc.s      V_11
            ldloc.s      V_19
            callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
            callvirt     instance string [netstandard]System.Type::get_FullName()
            call         string [netstandard]System.String::Concat(string, string)
            call         void [netstandard]System.Console::WriteLine(string)
            nop          
            ldloc.s      V_21
            callvirt     instance string [netstandard]System.Object::ToString()
            call         void [netstandard]System.Console::WriteLine(string)
            nop          
            nop          
            leave.s      IL_0013
  }
  IL_0013: ldloc.s      V_11
           ldloc.s      V_19
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           call         string CilBrowser.Core.HtmlGenerator::GenerateTypeFileName(class [netstandard]System.Type)
           stloc.s      V_20
           ldloc.1      
           call         bool [netstandard]System.String::IsNullOrWhiteSpace(string)
           ldc.i4.0     
           ceq          
           stloc.s      V_22
           ldloc.s      V_22
           brfalse.s    IL_0014
           nop          
           ldloc.s      V_11
           ldloc.s      V_19
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           callvirt     instance string [netstandard]System.Type::get_FullName()
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           ldloc.3      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::StartParagraph()
           nop          
           ldloc.3      
           ldloc.s      V_20
           ldloc.s      V_11
           ldloc.s      V_19
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           callvirt     instance string [netstandard]System.Type::get_FullName()
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteHyperlink(string, string)
           nop          
           ldloc.3      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::EndParagraph()
           nop          
           nop          
           br.s         IL_0015
  IL_0014: nop          
           ldloc.s      V_11
           ldloc.s      V_19
           callvirt     instance !0 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Item(int32)
           callvirt     instance string [netstandard]System.Type::get_FullName()
           ldstr        " - empty"
           call         string [netstandard]System.String::Concat(string, string)
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           nop          
  IL_0015: ldarg.2      
           ldloc.s      V_20
           call         string [netstandard]System.IO.Path::Combine(string, string)
           ldloc.1      
           call         class [netstandard]System.Text.Encoding [netstandard]System.Text.Encoding::get_UTF8()
           call         void [netstandard]System.IO.File::WriteAllText(string, string, class [netstandard]System.Text.Encoding)
           nop          
           nop          
           ldloc.s      V_19
           ldc.i4.1     
           add          
           stloc.s      V_19
  IL_0016: ldloc.s      V_19
           ldloc.s      V_11
           callvirt     instance int32 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Count()
           clt          
           stloc.s      V_23
           ldloc.s      V_23
           brtrue       IL_0012
           nop          
  IL_0017: ldloc.s      V_9
           ldc.i4.1     
           add          
           stloc.s      V_9
  IL_0018: ldloc.s      V_9
           ldloc.s      V_7
           ldlen        
           conv.i4      
           clt          
           stloc.s      V_24
           ldloc.s      V_24
           brtrue       IL_0002
           ldloc.0      
           ldloc.3      
           callvirt     instance void CilBrowser.Core.HtmlGenerator::WriteFooter(class CilBrowser.Core.HtmlBuilder)
           nop          
           ldloc.3      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::EndDocument()
           nop          
           ldarg.2      
           ldstr        "index.html"
           call         string [netstandard]System.IO.Path::Combine(string, string)
           ldloc.2      
           callvirt     instance string [netstandard]System.Object::ToString()
           call         class [netstandard]System.Text.Encoding [netstandard]System.Text.Encoding::get_UTF8()
           call         void [netstandard]System.IO.File::WriteAllText(string, string, class [netstandard]System.Text.Encoding)
           nop          
           ret          
 }

 .method assembly hidebysig static string VisualizeNavigationPanel(
     string filename, 
     string dirName, 
     string[] dirFiles, 
     class [netstandard]System.Collections.Generic.HashSet`1<string> sourceExtensions
 ) cil managed
 {
  .maxstack  4
  .locals  init (class [netstandard]System.Text.StringBuilder V_0,
     class CilBrowser.Core.HtmlBuilder V_1,
     int32 V_2,
     string V_3,
     bool V_4,
     bool V_5,
     string V_6,
     bool V_7,
     string V_8)

           nop          
           ldc.i4       1000
           newobj       instance void [netstandard]System.Text.StringBuilder::.ctor(int32)
           stloc.0      
           ldloc.0      
           newobj       instance void CilBrowser.Core.HtmlBuilder::.ctor(class [netstandard]System.Text.StringBuilder)
           stloc.1      
           ldloc.1      
           ldstr        "Files in "
           ldarg.1      
           ldstr        " directory:"
           call         string [netstandard]System.String::Concat(string, string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteParagraph(string)
           nop          
           ldc.i4.0     
           stloc.2      
           br.s         IL_0006
  IL_0001: nop          
           ldarg.2      
           ldloc.2      
           ldelem.ref   
           ldarg.3      
           call         bool CilBrowser.Core.FileUtils::IsSourceFile(string, class [netstandard]System.Collections.Generic.HashSet`1<string>)
           ldc.i4.0     
           ceq          
           stloc.s      V_4
           ldloc.s      V_4
           brfalse.s    IL_0002
           br.s         IL_0005
  IL_0002: ldloc.1      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::StartParagraph()
           nop          
           ldarg.2      
           ldloc.2      
           ldelem.ref   
           call         string [netstandard]System.IO.Path::GetFileName(string)
           stloc.3      
           ldloc.3      
           ldarg.0      
           call         bool CilBrowser.Core.Utils::StrEquals(string, string)
           stloc.s      V_5
           ldloc.s      V_5
           brfalse.s    IL_0003
           nop          
           ldloc.1      
           ldstr        "b"
           ldarg.0      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string)
           nop          
           nop          
           br.s         IL_0004
  IL_0003: nop          
           ldloc.3      
           call         string CilBrowser.Core.FileUtils::FileNameToPageName(string)
           stloc.s      V_6
           ldloc.1      
           ldloc.s      V_6
           call         string [netstandard]System.Net.WebUtility::UrlEncode(string)
           ldloc.3      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteHyperlink(string, string)
           nop          
           nop          
  IL_0004: ldloc.1      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::EndParagraph()
           nop          
           nop          
  IL_0005: ldloc.2      
           ldc.i4.1     
           add          
           stloc.2      
  IL_0006: ldloc.2      
           ldarg.2      
           ldlen        
           conv.i4      
           clt          
           stloc.s      V_7
           ldloc.s      V_7
           brtrue.s     IL_0001
           ldloc.0      
           callvirt     instance string [netstandard]System.Object::ToString()
           stloc.s      V_8
           br.s         IL_0007
  IL_0007: ldloc.s      V_8
           ret          
 }

 .method assembly hidebysig static string VisualizeNavigationPanel(
     class CilBrowser.Core.Structure.PageNode fileNode, 
     string dirName, 
     class CilBrowser.Core.Structure.PageNode[] dirFiles, 
     valuetype CilBrowser.Core.Structure.TreeNodeKind kind
 ) cil managed
 {
  .maxstack  4
  .locals  init (class [netstandard]System.Text.StringBuilder V_0,
     class CilBrowser.Core.HtmlBuilder V_1,
     bool V_2,
     int32 V_3,
     string V_4,
     bool V_5,
     string V_6,
     bool V_7,
     string V_8)

           nop          
           ldc.i4       1000
           newobj       instance void [netstandard]System.Text.StringBuilder::.ctor(int32)
           stloc.0      
           ldloc.0      
           newobj       instance void CilBrowser.Core.HtmlBuilder::.ctor(class [netstandard]System.Text.StringBuilder)
           stloc.1      
           ldarg.3      
           ldc.i4.2     
           ceq          
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0001
           ldloc.1      
           ldstr        "Files in "
           ldarg.1      
           ldstr        " directory:"
           call         string [netstandard]System.String::Concat(string, string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteParagraph(string)
           nop          
           br.s         IL_0002
  IL_0001: ldloc.1      
           ldstr        "Pages in "
           ldarg.1      
           ldstr        ":"
           call         string [netstandard]System.String::Concat(string, string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteParagraph(string)
           nop          
  IL_0002: ldc.i4.0     
           stloc.3      
           br.s         IL_0006
  IL_0003: nop          
           ldloc.1      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::StartParagraph()
           nop          
           ldarg.2      
           ldloc.3      
           ldelem.ref   
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
           stloc.s      V_4
           ldloc.s      V_4
           ldarg.0      
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
           call         bool CilBrowser.Core.Utils::StrEquals(string, string)
           stloc.s      V_5
           ldloc.s      V_5
           brfalse.s    IL_0004
           nop          
           ldloc.1      
           ldstr        "b"
           ldarg.0      
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_DisplayName()
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string)
           nop          
           nop          
           br.s         IL_0005
  IL_0004: nop          
           ldloc.s      V_4
           call         string CilBrowser.Core.FileUtils::FileNameToPageName(string)
           stloc.s      V_6
           ldloc.1      
           ldloc.s      V_6
           call         string [netstandard]System.Net.WebUtility::UrlEncode(string)
           ldarg.2      
           ldloc.3      
           ldelem.ref   
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_DisplayName()
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteHyperlink(string, string)
           nop          
           nop          
  IL_0005: ldloc.1      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::EndParagraph()
           nop          
           nop          
           ldloc.3      
           ldc.i4.1     
           add          
           stloc.3      
  IL_0006: ldloc.3      
           ldarg.2      
           ldlen        
           conv.i4      
           clt          
           stloc.s      V_7
           ldloc.s      V_7
           brtrue.s     IL_0003
           ldloc.0      
           callvirt     instance string [netstandard]System.Object::ToString()
           stloc.s      V_8
           br.s         IL_0007
  IL_0007: ldloc.s      V_8
           ret          
 }

 .method assembly hidebysig static string RenderNavigationPanel(
     string filepath, 
     string filename, 
     class [netstandard]System.Collections.Generic.HashSet`1<string> sourceExtensions
 ) cil managed
 {
  .maxstack  4
  .locals  init (string V_0,
     string V_1,
     string[] V_2,
     bool V_3,
     string V_4)

           nop          
           ldarg.0      
           call         string [netstandard]System.IO.Path::GetDirectoryName(string)
           stloc.0      
           ldloc.0      
           call         string CilBrowser.Core.Utils::GetDirectoryNameFromPath(string)
           stloc.1      
           ldloc.0      
           call         string[] [netstandard]System.IO.Directory::GetFiles(string)
           stloc.2      
           ldloc.2      
           ldlen        
           conv.i4      
           ldc.i4.1     
           cgt          
           stloc.3      
           ldloc.3      
           brfalse.s    IL_0001
           ldarg.1      
           ldloc.1      
           ldloc.2      
           ldarg.2      
           call         string CilBrowser.Core.WebsiteGenerator::VisualizeNavigationPanel(string, string, string[], class [netstandard]System.Collections.Generic.HashSet`1<string>)
           stloc.s      V_4
           br.s         IL_0002
  IL_0001: ldsfld       string [netstandard]System.String::Empty
           stloc.s      V_4
           br.s         IL_0002
  IL_0002: ldloc.s      V_4
           ret          
 }

 .method assembly hidebysig static string GetImagesURL(
     int32 level
 ) cil managed
 {
  .maxstack  2
  .locals  init (class [netstandard]System.Text.StringBuilder V_0,
     int32 V_1,
     bool V_2,
     string V_3)

           nop          
           ldarg.0      
           ldc.i4.3     
           mul          
           newobj       instance void [netstandard]System.Text.StringBuilder::.ctor(int32)
           stloc.0      
           ldc.i4.0     
           stloc.1      
           br.s         IL_0002
  IL_0001: ldloc.0      
           ldstr        "../"
           callvirt     instance class [netstandard]System.Text.StringBuilder [netstandard]System.Text.StringBuilder::Append(string)
           pop          
           ldloc.1      
           ldc.i4.1     
           add          
           stloc.1      
  IL_0002: ldloc.1      
           ldarg.0      
           clt          
           stloc.2      
           ldloc.2      
           brtrue.s     IL_0001
           ldloc.0      
           ldstr        "img/"
           callvirt     instance class [netstandard]System.Text.StringBuilder [netstandard]System.Text.StringBuilder::Append(string)
           pop          
           ldloc.0      
           callvirt     instance string [netstandard]System.Object::ToString()
           stloc.3      
           br.s         IL_0003
  IL_0003: ldloc.3      
           ret          
 }

 .method assembly hidebysig static void RenderDirsList(
     string[] dirs, 
     string dirIconURL, 
     class CilBrowser.Core.HtmlBuilder toc
 ) cil managed
 {
  .maxstack  5
  .locals  init (int32 V_0,
     string V_1,
     bool V_2,
     bool V_3)

           nop          
           ldarg.2      
           ldstr        "table"
           ldstr        "cellpadding"
           ldstr        "2px"
           call         class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::OneAttribute(string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldc.i4.0     
           stloc.0      
           br           IL_0004
  IL_0001: nop          
           ldarg.0      
           ldloc.0      
           ldelem.ref   
           call         string CilBrowser.Core.Utils::GetDirectoryNameFromPath(string)
           stloc.1      
           ldloc.1      
           call         bool CilBrowser.Core.FileUtils::IsDirectoryExcluded(string)
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0002
           br           IL_0003
  IL_0002: ldarg.2      
           ldstr        "tr"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.2      
           ldstr        "img"
           ldsfld       string [netstandard]System.String::Empty
           ldstr        "src"
           ldarg.1      
           call         class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::OneAttribute(string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.2      
           ldstr        "./"
           ldloc.1      
           call         string [netstandard]System.Net.WebUtility::UrlEncode(string)
           ldstr        "/index.html"
           call         string [netstandard]System.String::Concat(string, string, string)
           ldloc.1      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteHyperlink(string, string)
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.2      
           ldstr        "tr"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           nop          
  IL_0003: ldloc.0      
           ldc.i4.1     
           add          
           stloc.0      
  IL_0004: ldloc.0      
           ldarg.0      
           ldlen        
           conv.i4      
           clt          
           stloc.3      
           ldloc.3      
           brtrue       IL_0001
           ldarg.2      
           ldstr        "table"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ret          
 }

 .method assembly hidebysig static void RenderDirsList(
     class CilBrowser.Core.Structure.DirectoryNode[] dirs, 
     string dirIconURL, 
     class CilBrowser.Core.HtmlBuilder toc
 ) cil managed
 {
  .maxstack  5
  .locals  init (int32 V_0,
     string V_1,
     bool V_2,
     bool V_3)

           nop          
           ldarg.2      
           ldstr        "table"
           ldstr        "cellpadding"
           ldstr        "2px"
           call         class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::OneAttribute(string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldc.i4.0     
           stloc.0      
           br           IL_0004
  IL_0001: nop          
           ldarg.0      
           ldloc.0      
           ldelem.ref   
           callvirt     instance int32 CilBrowser.Core.Structure.DirectoryNode::get_PagesCount()
           ldarg.0      
           ldloc.0      
           ldelem.ref   
           callvirt     instance int32 CilBrowser.Core.Structure.DirectoryNode::get_DirectoriesCount()
           add          
           ldc.i4.0     
           ceq          
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0002
           nop          
           br           IL_0003
  IL_0002: ldarg.0      
           ldloc.0      
           ldelem.ref   
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
           stloc.1      
           ldarg.2      
           ldstr        "tr"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.2      
           ldstr        "img"
           ldsfld       string [netstandard]System.String::Empty
           ldstr        "src"
           ldarg.1      
           call         class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::OneAttribute(string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.2      
           ldstr        "./"
           ldloc.1      
           call         string [netstandard]System.Net.WebUtility::UrlEncode(string)
           ldstr        "/index.html"
           call         string [netstandard]System.String::Concat(string, string, string)
           ldloc.1      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteHyperlink(string, string)
           nop          
           ldarg.2      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.2      
           ldstr        "tr"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           nop          
  IL_0003: ldloc.0      
           ldc.i4.1     
           add          
           stloc.0      
  IL_0004: ldloc.0      
           ldarg.0      
           ldlen        
           conv.i4      
           clt          
           stloc.3      
           ldloc.3      
           brtrue       IL_0001
           ldarg.2      
           ldstr        "table"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ret          
 }

 .method assembly hidebysig static void RenderTocEntry(
     string displayName, 
     string pageName, 
     string fileIconURL, 
     class CilBrowser.Core.HtmlBuilder toc
 ) cil managed
 {
  .maxstack  5

           nop          
           ldarg.3      
           ldstr        "tr"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.3      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.3      
           ldstr        "img"
           ldsfld       string [netstandard]System.String::Empty
           ldstr        "src"
           ldarg.2      
           call         class CilBrowser.Core.HtmlAttribute[] CilBrowser.Core.HtmlBuilder::OneAttribute(string, string)
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string, class CilBrowser.Core.HtmlAttribute[])
           nop          
           ldarg.3      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.3      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagStart(string)
           nop          
           ldarg.3      
           ldarg.1      
           call         string [netstandard]System.Net.WebUtility::UrlEncode(string)
           ldarg.0      
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteHyperlink(string, string)
           nop          
           ldarg.3      
           ldstr        "td"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ldarg.3      
           ldstr        "tr"
           callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTagEnd(string)
           nop          
           ret          
 }

 .method public hidebysig static void GenerateFromSources(
     string sourcesPath, 
     string outputPath, 
     class CilBrowser.Core.CilBrowserOptions options, 
     string customFooter
 ) cil managed
 {
  .maxstack  5
  .locals  init (class CilBrowser.Core.Structure.DirectoryNode V_0,
     class [netstandard]System.Reflection.Assembly V_1,
     uint8[] V_2)

           nop          
           ldarg.0      
           ldarg.2      
           call         class CilBrowser.Core.Structure.DirectoryNode CilBrowser.Core.Structure.SourceIndexer::SourceDirectoryToTree(string, class CilBrowser.Core.CilBrowserOptions)
           stloc.0      
           ldloc.0      
           ldarg.1      
           ldarg.2      
           ldarg.3      
           ldc.i4.0     
           call         void CilBrowser.Core.WebsiteGenerator::GenerateFromTreeImpl(class CilBrowser.Core.Structure.DirectoryNode, string, class CilBrowser.Core.CilBrowserOptions, string, int32)
           nop          
           ldarg.1      
           ldstr        "img"
           call         string [netstandard]System.IO.Path::Combine(string, string)
           call         class [netstandard]System.IO.DirectoryInfo [netstandard]System.IO.Directory::CreateDirectory(string)
           pop          
           ldtoken      CilBrowser.Core.WebsiteGenerator
           call         class [netstandard]System.Type [netstandard]System.Type::GetTypeFromHandle(valuetype [netstandard]System.RuntimeTypeHandle)
           callvirt     instance class [netstandard]System.Reflection.Assembly [netstandard]System.Type::get_Assembly()
           stloc.1      
           ldloc.1      
           ldstr        "CilBrowser.Core.Images"
           ldstr        "dir.png"
           call         uint8[] CilBrowser.Core.FileUtils::ReadFromResource(class [netstandard]System.Reflection.Assembly, string, string)
           stloc.2      
           ldarg.1      
           ldstr        "img/dir.png"
           call         string [netstandard]System.IO.Path::Combine(string, string)
           ldloc.2      
           call         void [netstandard]System.IO.File::WriteAllBytes(string, uint8[])
           nop          
           ldloc.1      
           ldstr        "CilBrowser.Core.Images"
           ldstr        "file.png"
           call         uint8[] CilBrowser.Core.FileUtils::ReadFromResource(class [netstandard]System.Reflection.Assembly, string, string)
           stloc.2      
           ldarg.1      
           ldstr        "img/file.png"
           call         string [netstandard]System.IO.Path::Combine(string, string)
           ldloc.2      
           call         void [netstandard]System.IO.File::WriteAllBytes(string, uint8[])
           nop          
           ret          
 }

 .method private hidebysig static void GenerateFromTreeImpl(
     class CilBrowser.Core.Structure.DirectoryNode currentNode, 
     string outputPath, 
     class CilBrowser.Core.CilBrowserOptions options, 
     string customFooter, 
     int32 level
 ) cil managed
 {
  .maxstack  6
  .locals  init (class CilBrowser.Core.HtmlGenerator V_0,
     string V_1,
     bool V_2,
     bool V_3,
     class [netstandard]System.Collections.Generic.IEnumerator`1<class CilBrowser.Core.Structure.PageNode> V_4,
     class CilBrowser.Core.Structure.FileNode V_5,
     string V_6,
     string V_7,
     class [netstandard]System.Collections.Generic.IEnumerator`1<class CilBrowser.Core.Structure.DirectoryNode> V_8,
     class CilBrowser.Core.Structure.DirectoryNode V_9,
     string V_10,
     string V_11,
     class CilBrowser.Core.CilBrowserOptions V_12,
     bool V_13)

           nop          
           ldarg.s      level
           ldc.i4.s     50
           cgt          
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0001
           nop          
           ldstr        "Error: Website structure tree is too deep!"
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           br           IL_0013
  IL_0001: ldarg.0      
           callvirt     instance int32 CilBrowser.Core.Structure.DirectoryNode::get_PagesCount()
           ldarg.0      
           callvirt     instance int32 CilBrowser.Core.Structure.DirectoryNode::get_DirectoriesCount()
           add          
           ldc.i4.0     
           ceq          
           stloc.3      
           ldloc.3      
           brfalse.s    IL_0002
           nop          
           br           IL_0013
  IL_0002: ldstr        "Generating website from source directory tree: "
           ldarg.0      
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
           call         string [netstandard]System.String::Concat(string, string)
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           ldstr        "Output path: "
           ldarg.1      
           call         string [netstandard]System.String::Concat(string, string)
           call         void [netstandard]System.Console::WriteLine(string)
           nop          
           newobj       instance void CilBrowser.Core.HtmlGenerator::.ctor()
           stloc.0      
           ldloc.0      
           ldarg.3      
           callvirt     instance void CilBrowser.Core.HtmlGenerator::set_CustomFooter(string)
           nop          
           ldarg.1      
           call         class [netstandard]System.IO.DirectoryInfo [netstandard]System.IO.Directory::CreateDirectory(string)
           pop          
           nop          
           ldarg.0      
           callvirt     instance class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.Structure.PageNode> CilBrowser.Core.Structure.DirectoryNode::get_Pages()
           callvirt     instance class [netstandard]System.Collections.Generic.IEnumerator`1<!0> class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.Structure.PageNode>::GetEnumerator()
           stloc.s      V_4
  .try
  {
            br.s         IL_0004
   IL_0003: ldloc.s      V_4
            callvirt     instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1<class CilBrowser.Core.Structure.PageNode>::get_Current()
            castclass    CilBrowser.Core.Structure.FileNode
            stloc.s      V_5
            nop          
            ldloc.s      V_5
            callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
            call         void [netstandard]System.Console::WriteLine(string)
            nop          
            ldloc.s      V_5
            callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
            call         string CilBrowser.Core.FileUtils::FileNameToPageName(string)
            stloc.s      V_6
            ldloc.s      V_5
            ldloc.0      
            ldarg.2      
            callvirt     instance string CilBrowser.Core.Structure.TreeNode::RenderToString(class CilBrowser.Core.HtmlGenerator, class CilBrowser.Core.CilBrowserOptions)
            stloc.s      V_7
            ldarg.1      
            ldloc.s      V_6
            call         string [netstandard]System.IO.Path::Combine(string, string)
            ldloc.s      V_7
            call         class [netstandard]System.Text.Encoding [netstandard]System.Text.Encoding::get_UTF8()
            call         void [netstandard]System.IO.File::WriteAllText(string, string, class [netstandard]System.Text.Encoding)
            nop          
            nop          
   IL_0004: ldloc.s      V_4
            callvirt     instance bool [netstandard]System.Collections.IEnumerator::MoveNext()
            brtrue.s     IL_0003
            leave.s      IL_0006
  }
  finally
  {
            ldloc.s      V_4
            brfalse.s    IL_0005
            ldloc.s      V_4
            callvirt     instance void [netstandard]System.IDisposable::Dispose()
            nop          
   IL_0005: endfinally   
  }
  IL_0006: nop          
           ldarg.0      
           callvirt     instance class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.Structure.DirectoryNode> CilBrowser.Core.Structure.DirectoryNode::get_Directories()
           callvirt     instance class [netstandard]System.Collections.Generic.IEnumerator`1<!0> class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.Structure.DirectoryNode>::GetEnumerator()
           stloc.s      V_8
  .try
  {
            br.s         IL_0010
   IL_0007: ldloc.s      V_8
            callvirt     instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1<class CilBrowser.Core.Structure.DirectoryNode>::get_Current()
            stloc.s      V_9
            nop          
            ldloc.s      V_9
            callvirt     instance string CilBrowser.Core.Structure.TreeNode::get_Name()
            stloc.s      V_10
            ldarg.2      
            callvirt     instance string CilBrowser.Core.CilBrowserOptions::get_SourceControlURL()
            call         bool [netstandard]System.String::IsNullOrEmpty(string)
            ldc.i4.0     
            ceq          
            stloc.s      V_13
            ldloc.s      V_13
            brfalse.s    IL_0008
            ldarg.2      
            callvirt     instance string CilBrowser.Core.CilBrowserOptions::get_SourceControlURL()
            ldloc.s      V_10
            call         string CilBrowser.Core.Utils::UrlAppend(string, string)
            stloc.s      V_11
            br.s         IL_0009
   IL_0008: ldsfld       string [netstandard]System.String::Empty
            stloc.s      V_11
   IL_0009: ldarg.2      
            callvirt     instance class CilBrowser.Core.CilBrowserOptions CilBrowser.Core.CilBrowserOptions::Copy()
            stloc.s      V_12
            ldloc.s      V_12
            ldloc.s      V_11
            callvirt     instance void CilBrowser.Core.CilBrowserOptions::set_SourceControlURL(string)
            nop          
            ldloc.s      V_9
            ldarg.1      
            ldloc.s      V_10
            call         string [netstandard]System.IO.Path::Combine(string, string)
            ldloc.s      V_12
            ldarg.3      
            ldarg.s      level
            ldc.i4.1     
            add          
            call         void CilBrowser.Core.WebsiteGenerator::GenerateFromTreeImpl(class CilBrowser.Core.Structure.DirectoryNode, string, class CilBrowser.Core.CilBrowserOptions, string, int32)
            nop          
            nop          
   IL_0010: ldloc.s      V_8
            callvirt     instance bool [netstandard]System.Collections.IEnumerator::MoveNext()
            brtrue.s     IL_0007
            leave.s      IL_0012
  }
  finally
  {
            ldloc.s      V_8
            brfalse.s    IL_0011
            ldloc.s      V_8
            callvirt     instance void [netstandard]System.IDisposable::Dispose()
            nop          
   IL_0011: endfinally   
  }
  IL_0012: ldarg.0      
           ldloc.0      
           ldarg.2      
           callvirt     instance string CilBrowser.Core.Structure.TreeNode::RenderToString(class CilBrowser.Core.HtmlGenerator, class CilBrowser.Core.CilBrowserOptions)
           stloc.1      
           ldarg.1      
           ldstr        "index.html"
           call         string [netstandard]System.IO.Path::Combine(string, string)
           ldloc.1      
           call         class [netstandard]System.Text.Encoding [netstandard]System.Text.Encoding::get_UTF8()
           call         void [netstandard]System.IO.File::WriteAllText(string, string, class [netstandard]System.Text.Encoding)
           nop          
  IL_0013: ret          
 }

}

Back to table of contents


Generated by CIL Browser