.NET CIL Browser - CilBrowser.Core

Type: CilBrowser.Core.AssemblyServer

Types in CilBrowser.Core namespace:

AssemblyServer

CilBrowserOptions

FileUtils

HtmlAttribute

HtmlBuilder

HtmlGenerator

ServerBase

SourceServer

Utils

WebsiteGenerator

.class public auto ansi sealed beforefieldinit CilBrowser.Core.AssemblyServer
extends CilBrowser.Core.ServerBase
{

 .field private class [netstandard]System.Reflection.Assembly _ass
 .field private class CilBrowser.Core.HtmlGenerator _gen
 .field private class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> _typeMap

 .method public hidebysig specialname rtspecialname instance void .ctor(
     class [netstandard]System.Reflection.Assembly ass, 
     string urlHost, 
     string urlPrefix
 ) cil managed
 {
  .maxstack  3
  .locals  init (class [netstandard]System.Type[] V_0)

           ldarg.0      
           ldarg.2      
           ldarg.3      
           call         instance void CilBrowser.Core.ServerBase::.ctor(string, string)
           nop          
           nop          
           ldarg.0      
           ldarg.1      
           stfld        class [netstandard]System.Reflection.Assembly CilBrowser.Core.AssemblyServer::_ass
           ldarg.0      
           ldarg.1      
           newobj       instance void CilBrowser.Core.HtmlGenerator::.ctor(class [netstandard]System.Reflection.Assembly)
           stfld        class CilBrowser.Core.HtmlGenerator CilBrowser.Core.AssemblyServer::_gen
           ldarg.1      
           callvirt     instance class [netstandard]System.Type[] [netstandard]System.Reflection.Assembly::GetTypes()
           stloc.0      
           ldarg.0      
           ldloc.0      
           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[])
           stfld        class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> CilBrowser.Core.AssemblyServer::_typeMap
           ret          
 }

 .method private hidebysig instance int32 ResolveTokenFromUrl(
     string url
 ) cil managed
 {
  .maxstack  4
  .locals  init (string V_0,
     int32 V_1,
     bool V_2,
     int32 V_3)

           nop          
           ldarg.0      
           ldarg.1      
           call         instance string CilBrowser.Core.ServerBase::StripURL(string)
           stloc.0      
           ldloc.0      
           ldc.i4       515
           call         class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture()
           ldloca.s     V_1
           call         bool [netstandard]System.Int32::TryParse(string, valuetype [netstandard]System.Globalization.NumberStyles, class [netstandard]System.IFormatProvider, int32&)
           stloc.2      
           ldloc.2      
           brfalse.s    IL_0001
           nop          
           ldloc.1      
           stloc.3      
           br.s         IL_0002
  IL_0001: nop          
           ldc.i4.0     
           stloc.3      
           br.s         IL_0002
  IL_0002: ldloc.3      
           ret          
 }

 .method private hidebysig static class [netstandard]System.Type ResolveType(
     class [netstandard]System.Reflection.Assembly ass, 
     int32 metadataToken
 ) cil managed
 {
  .maxstack  2
  .locals  init (bool V_0,
     class [CilTools.BytecodeAnalysis]CilTools.Reflection.ITokenResolver V_1,
     class [netstandard]System.Type V_2)

           nop          
           ldarg.0      
           isinst       [CilTools.BytecodeAnalysis]CilTools.Reflection.ITokenResolver
           ldnull       
           cgt.un       
           stloc.0      
           ldloc.0      
           brfalse.s    IL_0001
           nop          
           ldarg.0      
           castclass    [CilTools.BytecodeAnalysis]CilTools.Reflection.ITokenResolver
           stloc.1      
           ldloc.1      
           ldarg.1      
           callvirt     instance class [netstandard]System.Type [CilTools.BytecodeAnalysis]CilTools.Reflection.ITokenResolver::ResolveType(int32)
           stloc.2      
           br.s         IL_0002
  IL_0001: nop          
           ldarg.0      
           callvirt     instance class [netstandard]System.Reflection.Module [netstandard]System.Reflection.Assembly::get_ManifestModule()
           ldarg.1      
           callvirt     instance class [netstandard]System.Type [netstandard]System.Reflection.Module::ResolveType(int32)
           stloc.2      
           br.s         IL_0002
  IL_0002: ldloc.2      
           ret          
 }

 .method family hidebysig virtual instance void OnStart() cil managed
 {
  .maxstack  8

           nop          
           ldstr        "Assembly: "
           ldarg.0      
           ldfld        class [netstandard]System.Reflection.Assembly CilBrowser.Core.AssemblyServer::_ass
           callvirt     instance class [netstandard]System.Reflection.AssemblyName [netstandard]System.Reflection.Assembly::GetName()
           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          
           ret          
 }

 .method family hidebysig virtual instance void RenderFrontPage(
     class [netstandard]System.Net.HttpListenerResponse response
 ) cil managed
 {
  .maxstack  4
  .locals  init (string[] V_0,
     class [netstandard]System.IO.StreamWriter V_1,
     class CilBrowser.Core.HtmlBuilder V_2,
     class [netstandard]System.IO.StreamWriter V_3,
     int32 V_4,
     string V_5,
     class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type> V_6,
     bool V_7,
     bool V_8,
     int32 V_9,
     string V_10,
     bool V_11,
     bool V_12)

           nop          
           ldarg.1      
           ldstr        "text/html; charset=utf-8"
           callvirt     instance void [netstandard]System.Net.HttpListenerResponse::set_ContentType(string)
           nop          
           ldarg.0      
           ldfld        class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> CilBrowser.Core.AssemblyServer::_typeMap
           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.0      
           ldloc.0      
           call         void [netstandard]System.Array::Sort<string>(!!0[])
           nop          
           ldarg.1      
           callvirt     instance class [netstandard]System.IO.Stream [netstandard]System.Net.HttpListenerResponse::get_OutputStream()
           newobj       instance void [netstandard]System.IO.StreamWriter::.ctor(class [netstandard]System.IO.Stream)
           stloc.1      
           ldloc.1      
           newobj       instance void CilBrowser.Core.HtmlBuilder::.ctor(class [netstandard]System.IO.TextWriter)
           stloc.2      
           ldloc.1      
           stloc.3      
  .try
  {
            nop          
            ldloc.2      
            ldarg.0      
            ldfld        class [netstandard]System.Reflection.Assembly CilBrowser.Core.AssemblyServer::_ass
            call         void CilBrowser.Core.HtmlGenerator::WriteTocStart(class CilBrowser.Core.HtmlBuilder, class [netstandard]System.Reflection.Assembly)
            nop          
            ldc.i4.0     
            stloc.s      V_4
            br           IL_0008
   IL_0001: nop          
            ldloc.0      
            ldloc.s      V_4
            ldelem.ref   
            stloc.s      V_5
            ldarg.0      
            ldfld        class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> CilBrowser.Core.AssemblyServer::_typeMap
            ldloc.0      
            ldloc.s      V_4
            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_6
            ldloc.s      V_6
            callvirt     instance int32 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Count()
            ldc.i4.0     
            ceq          
            stloc.s      V_7
            ldloc.s      V_7
            brfalse.s    IL_0002
            br           IL_0007
   IL_0002: ldloc.s      V_5
            call         bool [netstandard]System.String::IsNullOrEmpty(string)
            stloc.s      V_8
            ldloc.s      V_8
            brfalse.s    IL_0003
            ldstr        "(No namespace)"
            stloc.s      V_5
            br.s         IL_0004
   IL_0003: ldloc.s      V_5
            ldstr        " namespace"
            call         string [netstandard]System.String::Concat(string, string)
            stloc.s      V_5
   IL_0004: ldloc.2      
            ldstr        "h2"
            ldloc.s      V_5
            callvirt     instance void CilBrowser.Core.HtmlBuilder::WriteTag(string, string)
            nop          
            ldc.i4.0     
            stloc.s      V_9
            br.s         IL_0006
   IL_0005: nop          
            ldloc.s      V_6
            ldloc.s      V_9
            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_10
            ldloc.2      
            callvirt     instance void CilBrowser.Core.HtmlBuilder::StartParagraph()
            nop          
            ldloc.2      
            ldloc.s      V_10
            ldloc.s      V_6
            ldloc.s      V_9
            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.2      
            callvirt     instance void CilBrowser.Core.HtmlBuilder::EndParagraph()
            nop          
            nop          
            ldloc.s      V_9
            ldc.i4.1     
            add          
            stloc.s      V_9
   IL_0006: ldloc.s      V_9
            ldloc.s      V_6
            callvirt     instance int32 class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>::get_Count()
            clt          
            stloc.s      V_11
            ldloc.s      V_11
            brtrue.s     IL_0005
            nop          
   IL_0007: ldloc.s      V_4
            ldc.i4.1     
            add          
            stloc.s      V_4
   IL_0008: ldloc.s      V_4
            ldloc.0      
            ldlen        
            conv.i4      
            clt          
            stloc.s      V_12
            ldloc.s      V_12
            brtrue       IL_0001
            ldarg.0      
            ldfld        class CilBrowser.Core.HtmlGenerator CilBrowser.Core.AssemblyServer::_gen
            ldloc.2      
            callvirt     instance void CilBrowser.Core.HtmlGenerator::WriteFooter(class CilBrowser.Core.HtmlBuilder)
            nop          
            ldloc.2      
            callvirt     instance void CilBrowser.Core.HtmlBuilder::EndDocument()
            nop          
            nop          
            leave.s      IL_0010
  }
  finally
  {
            ldloc.3      
            brfalse.s    IL_0009
            ldloc.3      
            callvirt     instance void [netstandard]System.IDisposable::Dispose()
            nop          
   IL_0009: endfinally   
  }
  IL_0010: ret          
 }

 .method family hidebysig virtual instance void RenderPage(
     string url, 
     class [netstandard]System.Net.HttpListenerResponse response
 ) cil managed
 {
  .maxstack  3
  .locals  init (string V_0,
     int32 V_1,
     class [netstandard]System.Type V_2,
     bool V_3,
     bool V_4,
     bool V_5)

           nop          
           ldarg.1      
           ldarg.0      
           ldfld        string CilBrowser.Core.ServerBase::_urlPrefix
           ldstr        "assembly.html"
           call         string [netstandard]System.String::Concat(string, string)
           call         bool CilBrowser.Core.Utils::StrEquals(string, string)
           stloc.3      
           ldloc.3      
           brfalse.s    IL_0001
           nop          
           ldarg.0      
           ldfld        class CilBrowser.Core.HtmlGenerator CilBrowser.Core.AssemblyServer::_gen
           ldarg.0      
           ldfld        class [netstandard]System.Reflection.Assembly CilBrowser.Core.AssemblyServer::_ass
           callvirt     instance string CilBrowser.Core.HtmlGenerator::VisualizeAssemblyManifest(class [netstandard]System.Reflection.Assembly)
           stloc.0      
           ldarg.2      
           ldloc.0      
           call         void CilBrowser.Core.ServerBase::SendHtmlResponse(class [netstandard]System.Net.HttpListenerResponse, string)
           nop          
           ldarg.0      
           ldarg.1      
           ldloc.0      
           call         instance void CilBrowser.Core.ServerBase::AddToCache(string, string)
           nop          
           br.s         IL_0004
  IL_0001: ldarg.0      
           ldarg.1      
           call         instance int32 CilBrowser.Core.AssemblyServer::ResolveTokenFromUrl(string)
           stloc.1      
           ldloc.1      
           ldc.i4.0     
           ceq          
           stloc.s      V_4
           ldloc.s      V_4
           brfalse.s    IL_0002
           nop          
           ldarg.2      
           ldc.i4       404
           ldstr        "Not found"
           call         void CilBrowser.Core.ServerBase::SendErrorResponse(class [netstandard]System.Net.HttpListenerResponse, int32, string)
           nop          
           br.s         IL_0004
  IL_0002: ldarg.0      
           ldfld        class [netstandard]System.Reflection.Assembly CilBrowser.Core.AssemblyServer::_ass
           ldloc.1      
           call         class [netstandard]System.Type CilBrowser.Core.AssemblyServer::ResolveType(class [netstandard]System.Reflection.Assembly, int32)
           stloc.2      
           ldloc.2      
           ldnull       
           call         bool [netstandard]System.Type::op_Equality(class [netstandard]System.Type, class [netstandard]System.Type)
           stloc.s      V_5
           ldloc.s      V_5
           brfalse.s    IL_0003
           nop          
           ldarg.2      
           ldc.i4       404
           ldstr        "Not found"
           call         void CilBrowser.Core.ServerBase::SendErrorResponse(class [netstandard]System.Net.HttpListenerResponse, int32, string)
           nop          
           br.s         IL_0004
  IL_0003: ldarg.0      
           ldfld        class CilBrowser.Core.HtmlGenerator CilBrowser.Core.AssemblyServer::_gen
           ldloc.2      
           ldarg.0      
           ldfld        class [netstandard]System.Collections.Generic.Dictionary`2<string, class [netstandard]System.Collections.Generic.List`1<class [netstandard]System.Type>> CilBrowser.Core.AssemblyServer::_typeMap
           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.0      
           ldarg.2      
           ldloc.0      
           call         void CilBrowser.Core.ServerBase::SendHtmlResponse(class [netstandard]System.Net.HttpListenerResponse, string)
           nop          
           ldarg.0      
           ldarg.1      
           ldloc.0      
           call         instance void CilBrowser.Core.ServerBase::AddToCache(string, string)
           nop          
  IL_0004: ret          
 }

}

Back to table of contents


Generated by CIL Browser