2 // Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // Metadata version: v4.0.30319
8 .assembly extern mscorlib
10 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
15 .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
16 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
17 .hash algorithm 0x00008004
20 .module 'test-901.exe'
21 // MVID: {66ECA143-8B2A-47EB-A840-23ED00E2033E}
23 .file alignment 0x00000200
24 .stackreserve 0x00100000
25 .subsystem 0x0003 // WINDOWS_CUI
26 .corflags 0x00000001 // ILONLY
27 // Image base: 0x00620000
30 // =============== CLASS MEMBERS DECLARATION ===================
32 .class public auto ansi beforefieldinit Application
33 extends [mscorlib]System.Object
35 .class auto ansi sealed nested private beforefieldinit '<foo>c__async0`1'<.ctor ([mscorlib]System.Exception, [mscorlib]System.Runtime.Serialization.ISerializable, [mscorlib]System.Runtime.InteropServices._Exception) TException>
36 extends [mscorlib]System.ValueType
37 implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
39 .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
40 .field assembly valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder $builder
41 .field assembly int32 $PC
42 .method public hidebysig newslot virtual final
43 instance void MoveNext() cil managed
45 // Code size 94 (0x5e)
47 .locals init (class [mscorlib]System.Exception V_0)
49 IL_0001: ldfld int32 valuetype Application/'<foo>c__async0`1'<!TException>::$PC
52 IL_0008: stfld int32 valuetype Application/'<foo>c__async0`1'<!TException>::$PC
53 IL_000d: brtrue IL_005d
57 IL_0012: call !!0 [mscorlib]System.Activator::CreateInstance<!TException>()
58 IL_0017: box !TException
65 IL_001e: ldstr "caught in correct block"
66 IL_0023: call void [mscorlib]System.Console::WriteLine(string)
67 IL_0028: leave IL_0052
70 catch [mscorlib]System.Exception
73 IL_002e: ldstr "caught in generic block"
74 IL_0033: call void [mscorlib]System.Console::WriteLine(string)
75 IL_0038: ldstr "type: "
77 IL_003e: callvirt instance class [mscorlib]System.Type [mscorlib]System.Exception::GetType()
78 IL_0043: call string [mscorlib]System.String::Concat(object,
80 IL_0048: call void [mscorlib]System.Console::WriteLine(string)
81 IL_004d: leave IL_0052
85 IL_0053: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!TException>::$builder
86 IL_0058: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult()
88 } // end of method '<foo>c__async0`1'::MoveNext
90 .method public hidebysig newslot virtual final
91 instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) cil managed
93 .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
97 IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!TException>::$builder
99 IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
101 } // end of method '<foo>c__async0`1'::SetStateMachine
103 } // end of class '<foo>c__async0`1'
105 .method public hidebysig specialname rtspecialname
106 instance void .ctor() cil managed
111 IL_0001: call instance void [mscorlib]System.Object::.ctor()
113 } // end of method Application::.ctor
115 .method private hidebysig static class [mscorlib]System.Threading.Tasks.Task
116 foo<.ctor ([mscorlib]System.Exception) TException>() cil managed
118 .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 1C 41 70 70 6C 69 63 61 74 69 6F 6E 2B 3C // ...Application+<
119 66 6F 6F 3E 63 5F 5F 61 73 79 6E 63 30 60 31 00 // foo>c__async0`1.
121 .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
122 // Code size 33 (0x21)
124 .locals init (valuetype Application/'<foo>c__async0`1'<!!TException> V_0)
125 IL_0000: ldloca.s V_0
126 IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create()
127 IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!!TException>::$builder
128 IL_000c: ldloca.s V_0
129 IL_000e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!!TException>::$builder
131 IL_0014: ldloca.s V_0
132 IL_0016: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Start<valuetype Application/'<foo>c__async0`1'<!!0>>(!!0&)
133 IL_001b: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task()
135 } // end of method Application::foo
137 .method private hidebysig static void Main(string[] args) cil managed
140 // Code size 11 (0xb)
142 IL_0000: call class [mscorlib]System.Threading.Tasks.Task Application::foo<class [mscorlib]System.InvalidOperationException>()
143 IL_0005: callvirt instance void [mscorlib]System.Threading.Tasks.Task::Wait()
145 } // end of method Application::Main
147 } // end of class Application
150 // =============================================================
152 // *********** DISASSEMBLY COMPLETE ***********************