Types in CilBrowser.Core namespace: AssemblyServer CilBrowserOptions FileUtils HtmlAttribute HtmlBuilder HtmlGenerator ServerBase SourceServer Utils WebsiteGenerator |
.class private abstract auto ansi sealed beforefieldinit CilBrowser.Core.FileUtils
extends [netstandard]System.Object
{
.field private static class [netstandard]System.Collections.Generic.HashSet`1<string> s_srcExtensions
.field private static class [netstandard]System.Collections.Generic.HashSet`1<string> s_excludedDirs
.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
.maxstack 4
ldc.i4.s 33
newarr [netstandard]System.String
dup
ldc.i4.0
ldstr ".il"
stelem.ref
dup
ldc.i4.1
ldstr ".cil"
stelem.ref
dup
ldc.i4.2
ldstr ".cs"
stelem.ref
dup
ldc.i4.3
ldstr ".vb"
stelem.ref
dup
ldc.i4.4
ldstr ".c"
stelem.ref
dup
ldc.i4.5
ldstr ".cpp"
stelem.ref
dup
ldc.i4.6
ldstr ".h"
stelem.ref
dup
ldc.i4.7
ldstr ".hpp"
stelem.ref
dup
ldc.i4.8
ldstr ".js"
stelem.ref
dup
ldc.i4.s 9
ldstr ".ts"
stelem.ref
dup
ldc.i4.s 10
ldstr ".fs"
stelem.ref
dup
ldc.i4.s 11
ldstr ".txt"
stelem.ref
dup
ldc.i4.s 12
ldstr ".md"
stelem.ref
dup
ldc.i4.s 13
ldstr ".htm"
stelem.ref
dup
ldc.i4.s 14
ldstr ".html"
stelem.ref
dup
ldc.i4.s 15
ldstr ".css"
stelem.ref
dup
ldc.i4.s 16
ldstr ".xml"
stelem.ref
dup
ldc.i4.s 17
ldstr ".csproj"
stelem.ref
dup
ldc.i4.s 18
ldstr ".vbproj"
stelem.ref
dup
ldc.i4.s 19
ldstr ".vcxproj"
stelem.ref
dup
ldc.i4.s 20
ldstr ".proj"
stelem.ref
dup
ldc.i4.s 21
ldstr ".rc"
stelem.ref
dup
ldc.i4.s 22
ldstr ".cmd"
stelem.ref
dup
ldc.i4.s 23
ldstr ".bat"
stelem.ref
dup
ldc.i4.s 24
ldstr ".sh"
stelem.ref
dup
ldc.i4.s 25
ldstr ".ps1"
stelem.ref
dup
ldc.i4.s 26
ldstr ".xaml"
stelem.ref
dup
ldc.i4.s 27
ldstr ".config"
stelem.ref
dup
ldc.i4.s 28
ldstr ".json"
stelem.ref
dup
ldc.i4.s 29
ldstr ".yml"
stelem.ref
dup
ldc.i4.s 30
ldstr ".sln"
stelem.ref
dup
ldc.i4.s 31
ldstr ".props"
stelem.ref
dup
ldc.i4.s 32
ldstr ".targets"
stelem.ref
newobj instance void class [netstandard]System.Collections.Generic.HashSet`1<string>::.ctor(class [netstandard]System.Collections.Generic.IEnumerable`1<!0>)
stsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.FileUtils::s_srcExtensions
ldc.i4.8
newarr [netstandard]System.String
dup
ldc.i4.0
ldstr ".git"
stelem.ref
dup
ldc.i4.1
ldstr "bin"
stelem.ref
dup
ldc.i4.2
ldstr "obj"
stelem.ref
dup
ldc.i4.3
ldstr "packages"
stelem.ref
dup
ldc.i4.4
ldstr ".vs"
stelem.ref
dup
ldc.i4.5
ldstr "TestResults"
stelem.ref
dup
ldc.i4.6
ldstr "Debug"
stelem.ref
dup
ldc.i4.7
ldstr "Release"
stelem.ref
newobj instance void class [netstandard]System.Collections.Generic.HashSet`1<string>::.ctor(class [netstandard]System.Collections.Generic.IEnumerable`1<!0>)
stsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.FileUtils::s_excludedDirs
ret
}
.method assembly hidebysig static bool IsSourceFile(
string name,
class [netstandard]System.Collections.Generic.HashSet`1<string> srcExtensions
) cil managed
{
.maxstack 2
.locals init (string V_0,
bool V_1)
nop
ldarg.0
call string [netstandard]System.IO.Path::GetExtension(string)
callvirt instance string [netstandard]System.String::ToLower()
stloc.0
ldloc.0
ldsfld string [netstandard]System.String::Empty
call bool [netstandard]System.String::op_Equality(string, string)
brtrue.s IL_0001
ldarg.1
ldloc.0
callvirt instance bool class [netstandard]System.Collections.Generic.HashSet`1<string>::Contains(!0)
br.s IL_0002
IL_0001: ldc.i4.1
IL_0002: stloc.1
br.s IL_0003
IL_0003: ldloc.1
ret
}
.method assembly hidebysig static bool IsSourceFileDefault(
string name
) cil managed
{
.maxstack 2
.locals init (bool V_0)
nop
ldarg.0
ldsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.FileUtils::s_srcExtensions
call bool CilBrowser.Core.FileUtils::IsSourceFile(string, class [netstandard]System.Collections.Generic.HashSet`1<string>)
stloc.0
br.s IL_0001
IL_0001: ldloc.0
ret
}
.method assembly hidebysig static bool IsDirectoryExcluded(
string name
) cil managed
{
.maxstack 2
.locals init (bool V_0)
nop
ldsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.FileUtils::s_excludedDirs
ldarg.0
callvirt instance bool class [netstandard]System.Collections.Generic.HashSet`1<string>::Contains(!0)
stloc.0
br.s IL_0001
IL_0001: ldloc.0
ret
}
.method assembly hidebysig static class [netstandard]System.Collections.Generic.HashSet`1<string> GetDefaultExtensions() cil managed
{
.maxstack 1
.locals init (class [netstandard]System.Collections.Generic.HashSet`1<string> V_0)
nop
ldsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.FileUtils::s_srcExtensions
stloc.0
br.s IL_0001
IL_0001: ldloc.0
ret
}
.method assembly hidebysig static string FileNameToPageName(
string filename
) cil managed
{
.maxstack 2
.locals init (string V_0)
nop
ldarg.0
ldstr ".html"
call string [netstandard]System.String::Concat(string, string)
stloc.0
br.s IL_0001
IL_0001: ldloc.0
ret
}
.method assembly hidebysig static uint8[] ReadFromResource(
class [netstandard]System.Reflection.Assembly ass,
string ns,
string name
) cil managed
{
.maxstack 4
.locals init (class [netstandard]System.IO.Stream V_0,
class [netstandard]System.IO.MemoryStream V_1,
uint8[] V_2)
nop
ldarg.0
ldarg.1
ldstr "."
ldarg.2
call string [netstandard]System.String::Concat(string, string, string)
callvirt instance class [netstandard]System.IO.Stream [netstandard]System.Reflection.Assembly::GetManifestResourceStream(string)
stloc.0
.try
{
newobj instance void [netstandard]System.IO.MemoryStream::.ctor()
stloc.1
.try
{
nop
ldloc.0
ldloc.1
callvirt instance void [netstandard]System.IO.Stream::CopyTo(class [netstandard]System.IO.Stream)
nop
ldloc.1
callvirt instance uint8[] [netstandard]System.IO.MemoryStream::ToArray()
stloc.2
leave.s IL_0003
}
finally
{
ldloc.1
brfalse.s IL_0001
ldloc.1
callvirt instance void [netstandard]System.IDisposable::Dispose()
nop
IL_0001: endfinally
}
}
finally
{
ldloc.0
brfalse.s IL_0002
ldloc.0
callvirt instance void [netstandard]System.IDisposable::Dispose()
nop
IL_0002: endfinally
}
IL_0003: ldloc.2
ret
}
}
|