Types in CilBrowser.Core.Structure namespace: DirectoryNode <EnumChildNodes>d__16 <get_Directories>d__9 <get_Pages>d__11 FileNode PageNode SourceIndexer TreeNode TreeNodeKind TypeNode |
.class public abstract auto ansi sealed beforefieldinit CilBrowser.Core.Structure.SourceIndexer
extends [netstandard]System.Object
{
.method public hidebysig static class CilBrowser.Core.Structure.DirectoryNode SourceDirectoryToTree(
string sourcesPath,
class CilBrowser.Core.CilBrowserOptions options
) cil managed
{
.maxstack 3
.locals init (class CilBrowser.Core.Structure.DirectoryNode V_0)
nop
ldarg.0
ldarg.1
ldc.i4.0
call class CilBrowser.Core.Structure.DirectoryNode CilBrowser.Core.Structure.SourceIndexer::SourceDirectoryToTreeImpl(string, class CilBrowser.Core.CilBrowserOptions, int32)
stloc.0
br.s IL_0001
IL_0001: ldloc.0
ret
}
.method private hidebysig static class CilBrowser.Core.Structure.DirectoryNode SourceDirectoryToTreeImpl(
string sourcesPath,
class CilBrowser.Core.CilBrowserOptions options,
int32 level
) cil managed
{
.maxstack 4
.locals init (string V_0,
class CilBrowser.Core.Structure.DirectoryNode V_1,
class [netstandard]System.Collections.Generic.HashSet`1<string> V_2,
string[] V_3,
string[] V_4,
bool V_5,
class CilBrowser.Core.Structure.DirectoryNode V_6,
int32 V_7,
string V_8,
class CilBrowser.Core.Structure.DirectoryNode V_9,
bool V_10,
bool V_11,
bool V_12,
int32 V_13,
class CilBrowser.Core.Structure.FileNode V_14,
bool V_15,
bool V_16)
nop
ldarg.0
call string CilBrowser.Core.Utils::GetDirectoryNameFromPath(string)
stloc.0
ldloc.0
ldc.i4.2
newobj instance void CilBrowser.Core.Structure.DirectoryNode::.ctor(string, valuetype CilBrowser.Core.Structure.TreeNodeKind)
stloc.1
ldarg.2
ldc.i4.s 50
cgt
stloc.s V_5
ldloc.s V_5
brfalse.s IL_0001
nop
ldstr "Error: directory recursion is too deep!"
call void [netstandard]System.Console::WriteLine(string)
nop
ldloc.1
stloc.s V_6
br IL_0011
IL_0001: ldarg.1
callvirt instance class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.CilBrowserOptions::get_SourceExtensions()
stloc.2
ldarg.0
call string[] [netstandard]System.IO.Directory::GetDirectories(string)
stloc.3
ldloc.3
call void [netstandard]System.Array::Sort<string>(!!0[])
nop
ldc.i4.0
stloc.s V_7
br.s IL_0006
IL_0002: nop
ldloc.3
ldloc.s V_7
ldelem.ref
call string CilBrowser.Core.Utils::GetDirectoryNameFromPath(string)
stloc.s V_8
ldloc.s V_8
call bool CilBrowser.Core.FileUtils::IsDirectoryExcluded(string)
stloc.s V_10
ldloc.s V_10
brfalse.s IL_0003
br.s IL_0005
IL_0003: ldloc.3
ldloc.s V_7
ldelem.ref
ldarg.1
ldarg.2
ldc.i4.1
add
call class CilBrowser.Core.Structure.DirectoryNode CilBrowser.Core.Structure.SourceIndexer::SourceDirectoryToTreeImpl(string, class CilBrowser.Core.CilBrowserOptions, int32)
stloc.s V_9
ldloc.s V_9
callvirt instance int32 CilBrowser.Core.Structure.DirectoryNode::get_DirectoriesCount()
ldloc.s V_9
callvirt instance int32 CilBrowser.Core.Structure.DirectoryNode::get_PagesCount()
add
ldc.i4.0
ceq
stloc.s V_11
ldloc.s V_11
brfalse.s IL_0004
nop
br.s IL_0005
IL_0004: ldloc.1
ldloc.s V_9
callvirt instance void CilBrowser.Core.Structure.DirectoryNode::AddDirectory(class CilBrowser.Core.Structure.DirectoryNode)
nop
nop
IL_0005: ldloc.s V_7
ldc.i4.1
add
stloc.s V_7
IL_0006: ldloc.s V_7
ldloc.3
ldlen
conv.i4
clt
stloc.s V_12
ldloc.s V_12
brtrue.s IL_0002
ldarg.0
call string[] [netstandard]System.IO.Directory::GetFiles(string)
stloc.s V_4
ldloc.s V_4
call void [netstandard]System.Array::Sort<string>(!!0[])
nop
ldc.i4.0
stloc.s V_13
br.s IL_0010
IL_0007: nop
ldloc.s V_4
ldloc.s V_13
ldelem.ref
ldloc.2
call bool CilBrowser.Core.FileUtils::IsSourceFile(string, class [netstandard]System.Collections.Generic.HashSet`1<string>)
ldc.i4.0
ceq
stloc.s V_15
ldloc.s V_15
brfalse.s IL_0008
br.s IL_0009
IL_0008: ldloc.s V_4
ldloc.s V_13
ldelem.ref
newobj instance void CilBrowser.Core.Structure.FileNode::.ctor(string)
stloc.s V_14
ldloc.1
ldloc.s V_14
callvirt instance void CilBrowser.Core.Structure.DirectoryNode::AddPage(class CilBrowser.Core.Structure.PageNode)
nop
nop
IL_0009: ldloc.s V_13
ldc.i4.1
add
stloc.s V_13
IL_0010: ldloc.s V_13
ldloc.s V_4
ldlen
conv.i4
clt
stloc.s V_16
ldloc.s V_16
brtrue.s IL_0007
ldloc.1
stloc.s V_6
br.s IL_0011
IL_0011: ldloc.s V_6
ret
}
}
|