Skip to content

Instantly share code, notes, and snippets.

@kalambet
Created April 11, 2015 18:30
Show Gist options
  • Save kalambet/8e3c925b020290fa582d to your computer and use it in GitHub Desktop.
Save kalambet/8e3c925b020290fa582d to your computer and use it in GitHub Desktop.
DTO in C# 4 Part5
.method private hidebysig static void Main() cil managed
{
.entrypoint
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
// Code size 123 (0x7b)
.maxstack 7
.locals init ([0] class [mscorlib]System.Reflection.Assembly 'assembly',
[1] object 'instance',
[2] object res,
[3] bool CS$4$0000)
IL_0000: nop
IL_0001: ldstr "./delme.ext.dll"
IL_0006: call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::LoadFrom(string)
IL_000b: stloc.0
IL_000c: ldloc.0
IL_000d: ldstr "delme.ext.CDelmeExt"
IL_0012: callvirt instance object [mscorlib]System.Reflection.Assembly::CreateInstance(string)
IL_0017: stloc.1
IL_0018: ldsfld class [System.Core]System.Scripting.Actions.CallSite`1<class [system.core]system.func`4<class="" [system.core]system.scripting.actions.callsite,object,bool,object="">> delme.Program/'<main>o__SiteContainer0'::'<>p__Site1'
IL_001d: brtrue.s IL_0047
IL_001f: call class [System.Core]Microsoft.CSharp.RuntimeBinder.RuntimeBinder [System.Core]Microsoft.CSharp.RuntimeBinder.RuntimeBinder::GetInstance()
IL_0024: ldc.i4.0
IL_0025: ldc.i4.0
IL_0026: ldstr "WhoAreYuo"
IL_002b: ldtoken [mscorlib]System.Object
IL_0030: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0035: ldnull
IL_0036: newobj instance void [System.Core]Microsoft.CSharp.RuntimeBinder.CSharpCallPayload::.ctor(class [System.Core]Microsoft.CSharp.RuntimeBinder.RuntimeBinder,
bool,
bool,
string,
class [mscorlib]System.Type,
class [mscorlib]System.Type[])
IL_003b: call class [System.Core]System.Scripting.Actions.CallSite`1<!0> class [System.Core]System.Scripting.Actions.CallSite`1<class [system.core]system.func`4<class="" [system.core]system.scripting.actions.callsite,object,bool,object="">>::Create(class [System.Core]System.Scripting.Actions.CallSiteBinder)
IL_0040: stsfld class [System.Core]System.Scripting.Actions.CallSite`1<class [system.core]system.func`4<class="" [system.core]system.scripting.actions.callsite,object,bool,object="">> delme.Program/'<main>o__SiteContainer0'::'<>p__Site1'
IL_0045: br.s IL_0047
IL_0047: ldsfld class [System.Core]System.Scripting.Actions.CallSite`1<class [system.core]system.func`4<class="" [system.core]system.scripting.actions.callsite,object,bool,object="">> delme.Program/'<main>o__SiteContainer0'::'<>p__Site1'
IL_004c: ldfld !0 class [System.Core]System.Scripting.Actions.CallSite`1<class [system.core]system.func`4<class="" [system.core]system.scripting.actions.callsite,object,bool,object="">>::Target
IL_0051: ldsfld class [System.Core]System.Scripting.Actions.CallSite`1<class [system.core]system.func`4<class="" [system.core]system.scripting.actions.callsite,object,bool,object="">> delme.Program/'<main>o__SiteContainer0'::'<>p__Site1'
IL_0056: ldloc.1
IL_0057: ldc.i4.1
IL_0058: callvirt instance !3 class [System.Core]System.Func`4<class [system.core]system.scripting.actions.callsite,object,bool,object="">::Invoke(!0,
!1,
!2)
IL_005d: stloc.2
IL_005e: ldloc.2
IL_005f: isinst [mscorlib]System.String
IL_0064: ldnull
IL_0065: cgt.un
IL_0067: ldc.i4.0
IL_0068: ceq
IL_006a: stloc.3
IL_006b: ldloc.3
IL_006c: brtrue.s IL_007a
IL_006e: ldloc.2
IL_006f: castclass [mscorlib]System.String
IL_0074: call valuetype [System.Windows.Forms]System.Windows.Forms.DialogResult [System.Windows.Forms]System.Windows.Forms.MessageBox::Show(string)
IL_0079: pop
IL_007a: ret
} // end of method Program::Main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment