﻿.class private abstract auto ansi sealed beforefieldinit Costura.AssemblyLoader
extends [System.Private.CoreLib]System.Object
{
.class abstract auto ansi sealed nested private beforefieldinit '<>O'
extends [System.Private.CoreLib]System.Object
{
.field public static class [System.Private.CoreLib]System.Func`3<class [System.Runtime.Loader]System.Runtime.Loader.AssemblyLoadContext,class [System.Runtime]System.Reflection.AssemblyName,class [System.Runtime]System.Reflection.Assembly> '<0>__ResolveAssembly'
}
.field private static object nullCacheLock
.field private static class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool> nullCache
.field private static class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> assemblyNames
.field private static class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> symbolNames
.field private static int32 isAttached
.method private hidebysig static string
CultureToString(class [System.Private.CoreLib]System.Globalization.CultureInfo culture) cil managed
{
.maxstack  2
.locals init (bool V_0,
string V_1)
IL_0000:  nop
IL_0001:  ldarg.0
IL_0002:  ldnull
IL_0003:  ceq
IL_0005:  stloc.0
IL_0006:  ldloc.0
IL_0007:  brfalse.s  IL_0012
IL_0009:  nop
IL_000a:  ldsfld     string [System.Private.CoreLib]System.String::Empty
IL_000f:  stloc.1
IL_0010:  br.s       IL_001b
IL_0012:  ldarg.0
IL_0013:  callvirt   instance string [System.Private.CoreLib]System.Globalization.CultureInfo::get_Name()
IL_0018:  stloc.1
IL_0019:  br.s       IL_001b
IL_001b:  ldloc.1
IL_001c:  ret
}
.method private hidebysig static void  Log(string format,
object[] args) cil managed
{
.maxstack  8
IL_0000:  nop
IL_0001:  ldstr      "=== COSTURA === "
IL_0006:  ldarg.0
IL_0007:  ldarg.1
IL_0008:  call       string [System.Private.CoreLib]System.String::Format(string,
object[])
IL_000d:  call       string [System.Private.CoreLib]System.String::Concat(string,
string)
IL_0012:  call       void [System.Private.CoreLib]System.Diagnostics.Debug::WriteLine(string)
IL_0017:  nop
IL_0018:  ret
}
.method private hidebysig static class [System.Private.CoreLib]System.Reflection.Assembly
ReadExistingAssembly(class [System.Private.CoreLib]System.Reflection.AssemblyName name) cil managed
{
.maxstack  5
.locals init (class [System.Private.CoreLib]System.AppDomain V_0,
class [System.Private.CoreLib]System.Reflection.Assembly[] V_1,
class [System.Private.CoreLib]System.Reflection.Assembly[] V_2,
int32 V_3,
class [System.Private.CoreLib]System.Reflection.Assembly V_4,
class [System.Private.CoreLib]System.Reflection.AssemblyName V_5,
bool V_6,
class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext V_7,
bool V_8,
bool V_9,
bool V_10,
bool V_11,
class [System.Private.CoreLib]System.Reflection.Assembly V_12)
IL_0000:  nop
IL_0001:  call       class [System.Private.CoreLib]System.AppDomain [System.Private.CoreLib]System.AppDomain::get_CurrentDomain()
IL_0006:  stloc.0
IL_0007:  ldloc.0
IL_0008:  callvirt   instance class [System.Private.CoreLib]System.Reflection.Assembly[] [System.Private.CoreLib]System.AppDomain::GetAssemblies()
IL_000d:  stloc.1
IL_000e:  nop
IL_000f:  ldloc.1
IL_0010:  stloc.2
IL_0011:  ldc.i4.0
IL_0012:  stloc.3
IL_0013:  br         IL_00e6
IL_0018:  ldloc.2
IL_0019:  ldloc.3
IL_001a:  ldelem.ref
IL_001b:  stloc.s    V_4
IL_001d:  nop
IL_001e:  ldloc.s    V_4
IL_0020:  callvirt   instance class [System.Private.CoreLib]System.Reflection.AssemblyName [System.Private.CoreLib]System.Reflection.Assembly::GetName()
IL_0025:  stloc.s    V_5
IL_0027:  ldloc.s    V_5
IL_0029:  callvirt   instance string [System.Private.CoreLib]System.Reflection.AssemblyName::get_Name()
IL_002e:  ldarg.0
IL_002f:  callvirt   instance string [System.Private.CoreLib]System.Reflection.AssemblyName::get_Name()
IL_0034:  ldc.i4.3
IL_0035:  call       bool [System.Private.CoreLib]System.String::Equals(string,
string,
valuetype [System.Private.CoreLib]System.StringComparison)
IL_003a:  brfalse.s  IL_005b
IL_003c:  ldloc.s    V_5
IL_003e:  callvirt   instance class [System.Private.CoreLib]System.Globalization.CultureInfo [System.Private.CoreLib]System.Reflection.AssemblyName::get_CultureInfo()
IL_0043:  call       string Costura.AssemblyLoader::CultureToString(class [System.Private.CoreLib]System.Globalization.CultureInfo)
IL_0048:  ldarg.0
IL_0049:  callvirt   instance class [System.Private.CoreLib]System.Globalization.CultureInfo [System.Private.CoreLib]System.Reflection.AssemblyName::get_CultureInfo()
IL_004e:  call       string Costura.AssemblyLoader::CultureToString(class [System.Private.CoreLib]System.Globalization.CultureInfo)
IL_0053:  ldc.i4.3
IL_0054:  call       bool [System.Private.CoreLib]System.String::Equals(string,
string,
valuetype [System.Private.CoreLib]System.StringComparison)
IL_0059:  br.s       IL_005c
IL_005b:  ldc.i4.0
IL_005c:  stloc.s    V_6
IL_005e:  ldloc.s    V_6
IL_0060:  brfalse.s  IL_00e1
IL_0062:  nop
IL_0063:  ldloc.s    V_4
IL_0065:  call       class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext::GetLoadContext(class [System.Private.CoreLib]System.Reflection.Assembly)
IL_006a:  stloc.s    V_7
IL_006c:  ldloc.s    V_7
IL_006e:  call       class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext::get_Default()
IL_0073:  ceq
IL_0075:  stloc.s    V_8
IL_0077:  ldloc.s    V_8
IL_0079:  ldc.i4.0
IL_007a:  ceq
IL_007c:  stloc.s    V_9
IL_007e:  ldloc.s    V_9
IL_0080:  brfalse.s  IL_00c0
IL_0082:  nop
IL_0083:  ldstr      "System.Runtime.Loader.IndividualAssemblyLoadContext"
IL_0088:  ldloc.s    V_7
IL_008a:  callvirt   instance class [System.Private.CoreLib]System.Type [System.Private.CoreLib]System.Object::GetType()
IL_008f:  callvirt   instance string [System.Private.CoreLib]System.Type::get_FullName()
IL_0094:  call       bool [System.Private.CoreLib]System.String::op_Equality(string,
string)
IL_0099:  stloc.s    V_10
IL_009b:  ldloc.s    V_10
IL_009d:  ldc.i4.0
IL_009e:  ceq
IL_00a0:  stloc.s    V_11
IL_00a2:  ldloc.s    V_11
IL_00a4:  brfalse.s  IL_00bf
IL_00a6:  nop
IL_00a7:  ldstr      "Assembly Context is not valid '{0}'"
IL_00ac:  ldc.i4.1
IL_00ad:  newarr     [System.Private.CoreLib]System.Object
IL_00b2:  dup
IL_00b3:  ldc.i4.0
IL_00b4:  ldloc.s    V_7
IL_00b6:  stelem.ref
IL_00b7:  call       void Costura.AssemblyLoader::Log(string,
object[])
IL_00bc:  nop
IL_00bd:  br.s       IL_00e2
IL_00bf:  nop
IL_00c0:  ldstr      "Assembly '{0}' already loaded, returning existing "
+ "assembly"
IL_00c5:  ldc.i4.1
IL_00c6:  newarr     [System.Private.CoreLib]System.Object
IL_00cb:  dup
IL_00cc:  ldc.i4.0
IL_00cd:  ldloc.s    V_4
IL_00cf:  callvirt   instance string [System.Private.CoreLib]System.Reflection.Assembly::get_FullName()
IL_00d4:  stelem.ref
IL_00d5:  call       void Costura.AssemblyLoader::Log(string,
object[])
IL_00da:  nop
IL_00db:  ldloc.s    V_4
IL_00dd:  stloc.s    V_12
IL_00df:  br.s       IL_00f4
IL_00e1:  nop
IL_00e2:  ldloc.3
IL_00e3:  ldc.i4.1
IL_00e4:  add
IL_00e5:  stloc.3
IL_00e6:  ldloc.3
IL_00e7:  ldloc.2
IL_00e8:  ldlen
IL_00e9:  conv.i4
IL_00ea:  blt        IL_0018
IL_00ef:  ldnull
IL_00f0:  stloc.s    V_12
IL_00f2:  br.s       IL_00f4
IL_00f4:  ldloc.s    V_12
IL_00f6:  ret
}
.method private hidebysig static string
GetAssemblyResourceName(class [System.Private.CoreLib]System.Reflection.AssemblyName requestedAssemblyName) cil managed
{
.maxstack  3
.locals init (string V_0,
bool V_1,
string V_2)
IL_0000:  nop
IL_0001:  ldarg.0
IL_0002:  callvirt   instance string [System.Private.CoreLib]System.Reflection.AssemblyName::get_Name()
IL_0007:  callvirt   instance string [System.Private.CoreLib]System.String::ToLowerInvariant()
IL_000c:  stloc.0
IL_000d:  ldarg.0
IL_000e:  callvirt   instance class [System.Private.CoreLib]System.Globalization.CultureInfo [System.Private.CoreLib]System.Reflection.AssemblyName::get_CultureInfo()
IL_0013:  brfalse.s  IL_002a
IL_0015:  ldarg.0
IL_0016:  callvirt   instance class [System.Private.CoreLib]System.Globalization.CultureInfo [System.Private.CoreLib]System.Reflection.AssemblyName::get_CultureInfo()
IL_001b:  callvirt   instance string [System.Private.CoreLib]System.Globalization.CultureInfo::get_Name()
IL_0020:  call       bool [System.Private.CoreLib]System.String::IsNullOrEmpty(string)
IL_0025:  ldc.i4.0
IL_0026:  ceq
IL_0028:  br.s       IL_002b
IL_002a:  ldc.i4.0
IL_002b:  stloc.1
IL_002c:  ldloc.1
IL_002d:  brfalse.s  IL_004d
IL_002f:  nop
IL_0030:  ldarg.0
IL_0031:  callvirt   instance class [System.Private.CoreLib]System.Globalization.CultureInfo [System.Private.CoreLib]System.Reflection.AssemblyName::get_CultureInfo()
IL_0036:  call       string Costura.AssemblyLoader::CultureToString(class [System.Private.CoreLib]System.Globalization.CultureInfo)
IL_003b:  ldstr      "."
IL_0040:  ldloc.0
IL_0041:  call       string [System.Private.CoreLib]System.String::Concat(string,
string,
string)
IL_0046:  callvirt   instance string [System.Private.CoreLib]System.String::ToLowerInvariant()
IL_004b:  stloc.0
IL_004c:  nop
IL_004d:  ldloc.0
IL_004e:  stloc.2
IL_004f:  br.s       IL_0051
IL_0051:  ldloc.2
IL_0052:  ret
}
.method private hidebysig static void  CopyTo(class [System.Private.CoreLib]System.IO.Stream source,
class [System.Private.CoreLib]System.IO.Stream destination) cil managed
{
.maxstack  4
.locals init (uint8[] V_0,
int32 V_1,
bool V_2)
IL_0000:  nop
IL_0001:  ldc.i4     0x14000
IL_0006:  newarr     [System.Private.CoreLib]System.Byte
IL_000b:  stloc.0
IL_000c:  br.s       IL_001a
IL_000e:  nop
IL_000f:  ldarg.1
IL_0010:  ldloc.0
IL_0011:  ldc.i4.0
IL_0012:  ldloc.1
IL_0013:  callvirt   instance void [System.Private.CoreLib]System.IO.Stream::Write(uint8[],
int32,
int32)
IL_0018:  nop
IL_0019:  nop
IL_001a:  ldarg.0
IL_001b:  ldloc.0
IL_001c:  ldc.i4.0
IL_001d:  ldloc.0
IL_001e:  ldlen
IL_001f:  conv.i4
IL_0020:  callvirt   instance int32 [System.Private.CoreLib]System.IO.Stream::Read(uint8[],
int32,
int32)
IL_0025:  dup
IL_0026:  stloc.1
IL_0027:  ldc.i4.0
IL_0028:  cgt.un
IL_002a:  stloc.2
IL_002b:  ldloc.2
IL_002c:  brtrue.s   IL_000e
IL_002e:  ret
}
.method private hidebysig static class [System.Private.CoreLib]System.IO.Stream
LoadStream(string fullName) cil managed
{
.maxstack  2
.locals init (class [System.Private.CoreLib]System.Reflection.Assembly V_0,
bool V_1,
class [System.Private.CoreLib]System.IO.Stream V_2,
class [System.IO.Compression]System.IO.Compression.DeflateStream V_3,
class [System.Private.CoreLib]System.IO.MemoryStream V_4,
class [System.Private.CoreLib]System.IO.Stream V_5)
IL_0000:  nop
IL_0001:  call       class [System.Private.CoreLib]System.Reflection.Assembly [System.Private.CoreLib]System.Reflection.Assembly::GetExecutingAssembly()
IL_0006:  stloc.0
IL_0007:  ldarg.0
IL_0008:  ldstr      ".compressed"
IL_000d:  callvirt   instance bool [System.Private.CoreLib]System.String::EndsWith(string)
IL_0012:  stloc.1
IL_0013:  ldloc.1
IL_0014:  brfalse.s  IL_005e
IL_0016:  nop
IL_0017:  ldloc.0
IL_0018:  ldarg.0
IL_0019:  callvirt   instance class [System.Private.CoreLib]System.IO.Stream [System.Private.CoreLib]System.Reflection.Assembly::GetManifestResourceStream(string)
IL_001e:  stloc.2
.try
{
IL_001f:  ldloc.2
IL_0020:  ldc.i4.0
IL_0021:  newobj     instance void [System.IO.Compression]System.IO.Compression.DeflateStream::.ctor(class [System.Runtime]System.IO.Stream,
valuetype [System.IO.Compression]System.IO.Compression.CompressionMode)
IL_0026:  stloc.3
.try
{
IL_0027:  nop
IL_0028:  newobj     instance void [System.Private.CoreLib]System.IO.MemoryStream::.ctor()
IL_002d:  stloc.s    V_4
IL_002f:  ldloc.3
IL_0030:  ldloc.s    V_4
IL_0032:  call       void Costura.AssemblyLoader::CopyTo(class [System.Private.CoreLib]System.IO.Stream,
class [System.Private.CoreLib]System.IO.Stream)
IL_0037:  nop
IL_0038:  ldloc.s    V_4
IL_003a:  ldc.i4.0
IL_003b:  conv.i8
IL_003c:  callvirt   instance void [System.Private.CoreLib]System.IO.Stream::set_Position(int64)
IL_0041:  nop
IL_0042:  ldloc.s    V_4
IL_0044:  stloc.s    V_5
IL_0046:  leave.s    IL_0069
}  // end .try
finally
{
IL_0048:  ldloc.3
IL_0049:  brfalse.s  IL_0052
IL_004b:  ldloc.3
IL_004c:  callvirt   instance void [System.Private.CoreLib]System.IDisposable::Dispose()
IL_0051:  nop
IL_0052:  endfinally
}  // end handler
}  // end .try
finally
{
IL_0053:  ldloc.2
IL_0054:  brfalse.s  IL_005d
IL_0056:  ldloc.2
IL_0057:  callvirt   instance void [System.Private.CoreLib]System.IDisposable::Dispose()
IL_005c:  nop
IL_005d:  endfinally
}  // end handler
IL_005e:  ldloc.0
IL_005f:  ldarg.0
IL_0060:  callvirt   instance class [System.Private.CoreLib]System.IO.Stream [System.Private.CoreLib]System.Reflection.Assembly::GetManifestResourceStream(string)
IL_0065:  stloc.s    V_5
IL_0067:  br.s       IL_0069
IL_0069:  ldloc.s    V_5
IL_006b:  ret
}
.method private hidebysig static class [System.Private.CoreLib]System.IO.Stream
LoadStream(class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> resourceNames,
string name) cil managed
{
.maxstack  3
.locals init (string V_0,
bool V_1,
class [System.Private.CoreLib]System.IO.Stream V_2)
IL_0000:  nop
IL_0001:  ldarg.0
IL_0002:  ldarg.1
IL_0003:  ldloca.s   V_0
IL_0005:  callvirt   instance bool class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::TryGetValue(!0,
!1&)
IL_000a:  stloc.1
IL_000b:  ldloc.1
IL_000c:  brfalse.s  IL_0018
IL_000e:  nop
IL_000f:  ldloc.0
IL_0010:  call       class [System.Private.CoreLib]System.IO.Stream Costura.AssemblyLoader::LoadStream(string)
IL_0015:  stloc.2
IL_0016:  br.s       IL_001c
IL_0018:  ldnull
IL_0019:  stloc.2
IL_001a:  br.s       IL_001c
IL_001c:  ldloc.2
IL_001d:  ret
}
.method private hidebysig static uint8[]
ReadStream(class [System.Private.CoreLib]System.IO.Stream 'stream') cil managed
{
.maxstack  2
.locals init (class [System.Private.CoreLib]System.IO.MemoryStream V_0,
uint8[] V_1)
IL_0000:  nop
IL_0001:  newobj     instance void [System.Private.CoreLib]System.IO.MemoryStream::.ctor()
IL_0006:  stloc.0
.try
{
IL_0007:  nop
IL_0008:  ldarg.0
IL_0009:  ldloc.0
IL_000a:  callvirt   instance void [System.Private.CoreLib]System.IO.Stream::CopyTo(class [System.Private.CoreLib]System.IO.Stream)
IL_000f:  nop
IL_0010:  ldloc.0
IL_0011:  callvirt   instance uint8[] [System.Private.CoreLib]System.IO.MemoryStream::ToArray()
IL_0016:  stloc.1
IL_0017:  leave.s    IL_0024
}  // end .try
finally
{
IL_0019:  ldloc.0
IL_001a:  brfalse.s  IL_0023
IL_001c:  ldloc.0
IL_001d:  callvirt   instance void [System.Private.CoreLib]System.IDisposable::Dispose()
IL_0022:  nop
IL_0023:  endfinally
}  // end handler
IL_0024:  ldloc.1
IL_0025:  ret
}
.method private hidebysig static class [System.Private.CoreLib]System.Reflection.Assembly
ReadFromEmbeddedResources(class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> assemblyNames,
class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> symbolNames,
class [System.Private.CoreLib]System.Reflection.AssemblyName requestedAssemblyName) cil managed
{
.maxstack  2
.locals init (string V_0,
uint8[] V_1,
class [System.Private.CoreLib]System.IO.Stream V_2,
bool V_3,
class [System.Private.CoreLib]System.Reflection.Assembly V_4,
class [System.Private.CoreLib]System.IO.Stream V_5,
bool V_6,
uint8[] V_7)
IL_0000:  nop
IL_0001:  ldarg.2
IL_0002:  call       string Costura.AssemblyLoader::GetAssemblyResourceName(class [System.Private.CoreLib]System.Reflection.AssemblyName)
IL_0007:  stloc.0
IL_0008:  ldarg.0
IL_0009:  ldloc.0
IL_000a:  call       class [System.Private.CoreLib]System.IO.Stream Costura.AssemblyLoader::LoadStream(class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>,
string)
IL_000f:  stloc.2
.try
{
IL_0010:  nop
IL_0011:  ldloc.2
IL_0012:  ldnull
IL_0013:  ceq
IL_0015:  stloc.3
IL_0016:  ldloc.3
IL_0017:  brfalse.s  IL_001f
IL_0019:  nop
IL_001a:  ldnull
IL_001b:  stloc.s    V_4
IL_001d:  leave.s    IL_0079
IL_001f:  ldloc.2
IL_0020:  call       uint8[] Costura.AssemblyLoader::ReadStream(class [System.Private.CoreLib]System.IO.Stream)
IL_0025:  stloc.1
IL_0026:  nop
IL_0027:  leave.s    IL_0034
}  // end .try
finally
{
IL_0029:  ldloc.2
IL_002a:  brfalse.s  IL_0033
IL_002c:  ldloc.2
IL_002d:  callvirt   instance void [System.Private.CoreLib]System.IDisposable::Dispose()
IL_0032:  nop
IL_0033:  endfinally
}  // end handler
IL_0034:  ldarg.1
IL_0035:  ldloc.0
IL_0036:  call       class [System.Private.CoreLib]System.IO.Stream Costura.AssemblyLoader::LoadStream(class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>,
string)
IL_003b:  stloc.s    V_5
.try
{
IL_003d:  nop
IL_003e:  ldloc.s    V_5
IL_0040:  ldnull
IL_0041:  cgt.un
IL_0043:  stloc.s    V_6
IL_0045:  ldloc.s    V_6
IL_0047:  brfalse.s  IL_005f
IL_0049:  nop
IL_004a:  ldloc.s    V_5
IL_004c:  call       uint8[] Costura.AssemblyLoader::ReadStream(class [System.Private.CoreLib]System.IO.Stream)
IL_0051:  stloc.s    V_7
IL_0053:  ldloc.1
IL_0054:  ldloc.s    V_7
IL_0056:  call       class [System.Private.CoreLib]System.Reflection.Assembly [System.Private.CoreLib]System.Reflection.Assembly::Load(uint8[],
uint8[])
IL_005b:  stloc.s    V_4
IL_005d:  leave.s    IL_0079
IL_005f:  nop
IL_0060:  leave.s    IL_006f
}  // end .try
finally
{
IL_0062:  ldloc.s    V_5
IL_0064:  brfalse.s  IL_006e
IL_0066:  ldloc.s    V_5
IL_0068:  callvirt   instance void [System.Private.CoreLib]System.IDisposable::Dispose()
IL_006d:  nop
IL_006e:  endfinally
}  // end handler
IL_006f:  ldloc.1
IL_0070:  call       class [System.Private.CoreLib]System.Reflection.Assembly [System.Private.CoreLib]System.Reflection.Assembly::Load(uint8[])
IL_0075:  stloc.s    V_4
IL_0077:  br.s       IL_0079
IL_0079:  ldloc.s    V_4
IL_007b:  ret
}
.method public hidebysig static class [System.Private.CoreLib]System.Reflection.Assembly
ResolveAssembly(class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext assemblyLoadContext,
class [System.Private.CoreLib]System.Reflection.AssemblyName assemblyName) cil managed
{
.maxstack  5
.locals init (string V_0,
class [System.Private.CoreLib]System.Reflection.Assembly V_1,
object V_2,
bool V_3,
bool V_4,
class [System.Private.CoreLib]System.Reflection.Assembly V_5,
bool V_6,
bool V_7,
object V_8,
bool V_9,
bool V_10)
IL_0000:  nop
IL_0001:  ldarg.1
IL_0002:  callvirt   instance string [System.Private.CoreLib]System.Reflection.AssemblyName::get_Name()
IL_0007:  stloc.0
IL_0008:  ldsfld     object Costura.AssemblyLoader::nullCacheLock
IL_000d:  stloc.2
IL_000e:  ldc.i4.0
IL_000f:  stloc.3
.try
{
IL_0010:  ldloc.2
IL_0011:  ldloca.s   V_3
IL_0013:  call       void [System.Private.CoreLib]System.Threading.Monitor::Enter(object,
bool&)
IL_0018:  nop
IL_0019:  nop
IL_001a:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool> Costura.AssemblyLoader::nullCache
IL_001f:  ldloc.0
IL_0020:  callvirt   instance bool class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool>::ContainsKey(!0)
IL_0025:  stloc.s    V_4
IL_0027:  ldloc.s    V_4
IL_0029:  brfalse.s  IL_0034
IL_002b:  nop
IL_002c:  ldnull
IL_002d:  stloc.s    V_5
IL_002f:  leave      IL_00e3
IL_0034:  nop
IL_0035:  leave.s    IL_0042
}  // end .try
finally
{
IL_0037:  ldloc.3
IL_0038:  brfalse.s  IL_0041
IL_003a:  ldloc.2
IL_003b:  call       void [System.Private.CoreLib]System.Threading.Monitor::Exit(object)
IL_0040:  nop
IL_0041:  endfinally
}  // end handler
IL_0042:  ldarg.1
IL_0043:  call       class [System.Private.CoreLib]System.Reflection.Assembly Costura.AssemblyLoader::ReadExistingAssembly(class [System.Private.CoreLib]System.Reflection.AssemblyName)
IL_0048:  stloc.1
IL_0049:  ldloc.1
IL_004a:  ldnull
IL_004b:  cgt.un
IL_004d:  stloc.s    V_6
IL_004f:  ldloc.s    V_6
IL_0051:  brfalse.s  IL_005c
IL_0053:  nop
IL_0054:  ldloc.1
IL_0055:  stloc.s    V_5
IL_0057:  br         IL_00e3
IL_005c:  ldstr      "Loading assembly '{0}' into the current context"
IL_0061:  ldc.i4.1
IL_0062:  newarr     [System.Private.CoreLib]System.Object
IL_0067:  dup
IL_0068:  ldc.i4.0
IL_0069:  ldarg.1
IL_006a:  stelem.ref
IL_006b:  call       void Costura.AssemblyLoader::Log(string,
object[])
IL_0070:  nop
IL_0071:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::assemblyNames
IL_0076:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::symbolNames
IL_007b:  ldarg.1
IL_007c:  call       class [System.Private.CoreLib]System.Reflection.Assembly Costura.AssemblyLoader::ReadFromEmbeddedResources(class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>,
class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>,
class [System.Private.CoreLib]System.Reflection.AssemblyName)
IL_0081:  stloc.1
IL_0082:  ldloc.1
IL_0083:  ldnull
IL_0084:  ceq
IL_0086:  stloc.s    V_7
IL_0088:  ldloc.s    V_7
IL_008a:  brfalse.s  IL_00de
IL_008c:  nop
IL_008d:  ldsfld     object Costura.AssemblyLoader::nullCacheLock
IL_0092:  stloc.s    V_8
IL_0094:  ldc.i4.0
IL_0095:  stloc.s    V_9
.try
{
IL_0097:  ldloc.s    V_8
IL_0099:  ldloca.s   V_9
IL_009b:  call       void [System.Private.CoreLib]System.Threading.Monitor::Enter(object,
bool&)
IL_00a0:  nop
IL_00a1:  nop
IL_00a2:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool> Costura.AssemblyLoader::nullCache
IL_00a7:  ldloc.0
IL_00a8:  ldc.i4.1
IL_00a9:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool>::set_Item(!0,
!1)
IL_00ae:  nop
IL_00af:  nop
IL_00b0:  leave.s    IL_00bf
}  // end .try
finally
{
IL_00b2:  ldloc.s    V_9
IL_00b4:  brfalse.s  IL_00be
IL_00b6:  ldloc.s    V_8
IL_00b8:  call       void [System.Private.CoreLib]System.Threading.Monitor::Exit(object)
IL_00bd:  nop
IL_00be:  endfinally
}  // end handler
IL_00bf:  ldarg.1
IL_00c0:  callvirt   instance valuetype [System.Private.CoreLib]System.Reflection.AssemblyNameFlags [System.Private.CoreLib]System.Reflection.AssemblyName::get_Flags()
IL_00c5:  ldc.i4     0x100
IL_00ca:  and
IL_00cb:  ldc.i4.0
IL_00cc:  cgt.un
IL_00ce:  stloc.s    V_10
IL_00d0:  ldloc.s    V_10
IL_00d2:  brfalse.s  IL_00dd
IL_00d4:  nop
IL_00d5:  ldarg.1
IL_00d6:  call       class [System.Private.CoreLib]System.Reflection.Assembly [System.Private.CoreLib]System.Reflection.Assembly::Load(class [System.Private.CoreLib]System.Reflection.AssemblyName)
IL_00db:  stloc.1
IL_00dc:  nop
IL_00dd:  nop
IL_00de:  ldloc.1
IL_00df:  stloc.s    V_5
IL_00e1:  br.s       IL_00e3
IL_00e3:  ldloc.s    V_5
IL_00e5:  ret
}
.method private hidebysig specialname rtspecialname static
void  .cctor() cil managed
{
.maxstack  3
IL_0000:  newobj     instance void [System.Private.CoreLib]System.Object::.ctor()
IL_0005:  stsfld     object Costura.AssemblyLoader::nullCacheLock
IL_000a:  newobj     instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool>::.ctor()
IL_000f:  stsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,bool> Costura.AssemblyLoader::nullCache
IL_0014:  newobj     instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::.ctor()
IL_0019:  stsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::assemblyNames
IL_001e:  newobj     instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::.ctor()
IL_0023:  stsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::symbolNames
IL_0028:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::assemblyNames
IL_002d:  ldstr      "assemblytoreference"
IL_0032:  ldstr      "costura.assemblytoreference.dll.compressed"
IL_0037:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::Add(!0,
!1)
IL_003c:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::symbolNames
IL_0041:  ldstr      "assemblytoreference"
IL_0046:  ldstr      "costura.assemblytoreference.pdb.compressed"
IL_004b:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::Add(!0,
!1)
IL_0050:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::assemblyNames
IL_0055:  ldstr      "assemblytoreferencepreembedded"
IL_005a:  ldstr      "costura.assemblytoreferencepreembedded.dll.compres"
+ "sed"
IL_005f:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::Add(!0,
!1)
IL_0064:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::symbolNames
IL_0069:  ldstr      "assemblytoreferencepreembedded"
IL_006e:  ldstr      "costura.assemblytoreferencepreembedded.pdb.compres"
+ "sed"
IL_0073:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::Add(!0,
!1)
IL_0078:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::assemblyNames
IL_007d:  ldstr      "exetoreference"
IL_0082:  ldstr      "costura.exetoreference.exe.compressed"
IL_0087:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::Add(!0,
!1)
IL_008c:  ldsfld     class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string> Costura.AssemblyLoader::symbolNames
IL_0091:  ldstr      "exetoreference"
IL_0096:  ldstr      "costura.exetoreference.pdb.compressed"
IL_009b:  callvirt   instance void class [System.Private.CoreLib]System.Collections.Generic.Dictionary`2<string,string>::Add(!0,
!1)
IL_00a0:  ret
}
.method public hidebysig static void  Attach(bool subscribe) cil managed
{
.maxstack  3
.locals init (bool V_0,
bool V_1)
IL_0000:  nop
IL_0001:  ldsflda    int32 Costura.AssemblyLoader::isAttached
IL_0006:  ldc.i4.1
IL_0007:  call       int32 [System.Private.CoreLib]System.Threading.Interlocked::Exchange(int32&,
int32)
IL_000c:  ldc.i4.1
IL_000d:  ceq
IL_000f:  stloc.0
IL_0010:  ldloc.0
IL_0011:  brfalse.s  IL_0016
IL_0013:  nop
IL_0014:  br.s       IL_0043
IL_0016:  ldarg.0
IL_0017:  stloc.1
IL_0018:  ldloc.1
IL_0019:  brfalse.s  IL_0043
IL_001b:  nop
IL_001c:  call       class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext::get_Default()
IL_0021:  ldsfld     class [System.Private.CoreLib]System.Func`3<class [System.Runtime.Loader]System.Runtime.Loader.AssemblyLoadContext,class [System.Runtime]System.Reflection.AssemblyName,class [System.Runtime]System.Reflection.Assembly> Costura.AssemblyLoader/'<>O'::'<0>__ResolveAssembly'
IL_0026:  dup
IL_0027:  brtrue.s   IL_003c
IL_0029:  pop
IL_002a:  ldnull
IL_002b:  ldftn      class [System.Private.CoreLib]System.Reflection.Assembly Costura.AssemblyLoader::ResolveAssembly(class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext,
class [System.Private.CoreLib]System.Reflection.AssemblyName)
IL_0031:  newobj     instance void class [System.Private.CoreLib]System.Func`3<class [System.Runtime.Loader]System.Runtime.Loader.AssemblyLoadContext,class [System.Runtime]System.Reflection.AssemblyName,class [System.Runtime]System.Reflection.Assembly>::.ctor(object,
native int)
IL_0036:  dup
IL_0037:  stsfld     class [System.Private.CoreLib]System.Func`3<class [System.Runtime.Loader]System.Runtime.Loader.AssemblyLoadContext,class [System.Runtime]System.Reflection.AssemblyName,class [System.Runtime]System.Reflection.Assembly> Costura.AssemblyLoader/'<>O'::'<0>__ResolveAssembly'
IL_003c:  callvirt   instance void [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext::add_Resolving(class [System.Private.CoreLib]System.Func`3<class [System.Private.CoreLib]System.Runtime.Loader.AssemblyLoadContext,class [System.Private.CoreLib]System.Reflection.AssemblyName,class [System.Private.CoreLib]System.Reflection.Assembly>)
IL_0041:  nop
IL_0042:  nop
IL_0043:  ret
}
}