Skip to content

Instantly share code, notes, and snippets.

@gyuwon
Created September 30, 2017 06:38
Show Gist options
  • Save gyuwon/1ae0c5a6120f87880b24116ecab9306b to your computer and use it in GitHub Desktop.
Save gyuwon/1ae0c5a6120f87880b24116ecab9306b to your computer and use it in GitHub Desktop.
.class public auto ansi beforefieldinit FailFastAsync.Functions
extends [mscorlib]System.Object
{
.method public hidebysig specialname rtspecialname instance void .ctor () cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
.method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsyncUsingAnonymousFunction (
string name
) cil managed
{
IL_0000: newobj instance void FailFastAsync.Functions/'<>c__DisplayClass0_0'::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld string FailFastAsync.Functions/'<>c__DisplayClass0_0'::name
IL_000c: dup
IL_000d: ldfld string FailFastAsync.Functions/'<>c__DisplayClass0_0'::name
IL_0012: brtrue.s IL_001f
IL_0014: ldstr "name"
IL_0019: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string)
IL_001e: throw
IL_001f: ldftn instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'::'<FailFastAsyncUsingAnonymousFunction>b__0'()
IL_0025: newobj instance void class [mscorlib]System.Func`1<class [mscorlib]System.Threading.Tasks.Task`1<string>>::.ctor(object, native int)
IL_002a: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1<string> class [mscorlib]System.Func`1<class [mscorlib]System.Threading.Tasks.Task`1<string>>::Invoke()
IL_002f: ret
}
.method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsyncUsingLocalFunction (
string name
) cil managed
{
IL_0000: newobj instance void FailFastAsync.Functions/'<>c__DisplayClass1_0'::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld string FailFastAsync.Functions/'<>c__DisplayClass1_0'::name
IL_000c: dup
IL_000d: ldfld string FailFastAsync.Functions/'<>c__DisplayClass1_0'::name
IL_0012: brtrue.s IL_001f
IL_0014: ldstr "name"
IL_0019: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string)
IL_001e: throw
IL_001f: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'::'<FailFastAsyncUsingLocalFunction>g__core0'()
IL_0024: ret
}
.method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsyncUsingMethod (
string name
) cil managed
{
IL_0000: ldarg.1
IL_0001: brtrue.s IL_000e
IL_0003: ldstr "name"
IL_0008: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string)
IL_000d: throw
IL_000e: ldarg.0
IL_000f: ldarg.1
IL_0010: call instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsync.Functions::FailFastAsyncUsingMethodCore(string)
IL_0015: ret
}
.method private hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1<string> FailFastAsyncUsingMethodCore (
string name
) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = (
01 00 3a 46 61 69 6c 46 61 73 74 41 73 79 6e 63
2e 46 75 6e 63 74 69 6f 6e 73 2b 3c 46 61 69 6c
46 61 73 74 41 73 79 6e 63 55 73 69 6e 67 4d 65
74 68 6f 64 43 6f 72 65 3e 64 5f 5f 33 00 00
)
.locals init (
[0] valuetype FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3' V_0,
[1] valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> V_1
)
IL_0000: ldloca.s V_0
IL_0002: ldarg.1
IL_0003: stfld string FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::name
IL_0008: ldloca.s V_0
IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::Create()
IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_0014: ldloca.s V_0
IL_0016: ldc.i4.m1
IL_0017: stfld int32 FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>1__state'
IL_001c: ldloc.0
IL_001d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_0022: stloc.1
IL_0023: ldloca.s V_1
IL_0025: ldloca.s V_0
IL_0027: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::Start<valuetype FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'>(!!0&)
IL_002c: ldloca.s V_0
IL_002e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_0033: call instance class [mscorlib]System.Threading.Tasks.Task`1<string> valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::get_Task()
IL_0038: ret
}
.class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
01 00 00 00
)
.field public string name
.method public hidebysig specialname rtspecialname instance void .ctor () cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
.method assembly hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1<string> '<FailFastAsyncUsingAnonymousFunction>b__0' () cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = (
01 00 59 46 61 69 6c 46 61 73 74 41 73 79 6e 63
2e 46 75 6e 63 74 69 6f 6e 73 2b 3c 3e 63 5f 5f
44 69 73 70 6c 61 79 43 6c 61 73 73 30 5f 30 2b
3c 3c 46 61 69 6c 46 61 73 74 41 73 79 6e 63 55
73 69 6e 67 41 6e 6f 6e 79 6d 6f 75 73 46 75 6e
63 74 69 6f 6e 3e 62 5f 5f 30 3e 64 00 00
)
.locals init (
[0] valuetype FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d' V_0,
[1] valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> V_1
)
IL_0000: ldloca.s V_0
IL_0002: ldarg.0
IL_0003: stfld class FailFastAsync.Functions/'<>c__DisplayClass0_0' FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>4__this'
IL_0008: ldloca.s V_0
IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::Create()
IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_0014: ldloca.s V_0
IL_0016: ldc.i4.m1
IL_0017: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>1__state'
IL_001c: ldloc.0
IL_001d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_0022: stloc.1
IL_0023: ldloca.s V_1
IL_0025: ldloca.s V_0
IL_0027: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::Start<valuetype FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'>(!!0&)
IL_002c: ldloca.s V_0
IL_002e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_0033: call instance class [mscorlib]System.Threading.Tasks.Task`1<string> valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::get_Task()
IL_0038: ret
}
.class nested private auto ansi sealed beforefieldinit '<<FailFastAsyncUsingAnonymousFunction>b__0>d'
extends [mscorlib]System.ValueType
implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
{
.field public int32 '<>1__state'
.field public valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> '<>t__builder'
.field public class FailFastAsync.Functions/'<>c__DisplayClass0_0' '<>4__this'
.field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1'
.method private final hidebysig newslot virtual instance void MoveNext () cil managed
{
.override method instance void [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext()
.locals init (
[0] int32 V_0,
[1] class FailFastAsync.Functions/'<>c__DisplayClass0_0' V_1,
[2] string V_2,
[3] valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_3,
[4] class [mscorlib]System.Exception V_4
)
IL_0000: ldarg.0
IL_0001: ldfld int32 FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldarg.0
IL_0008: ldfld class FailFastAsync.Functions/'<>c__DisplayClass0_0' FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>4__this'
IL_000d: stloc.1
.try
{
IL_000e: ldloc.0
IL_000f: brfalse.s IL_0047
IL_0011: ldc.i4.s 10
IL_0013: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(int32)
IL_0018: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_001d: stloc.3
IL_001e: ldloca.s V_3
IL_0020: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted()
IL_0025: brtrue.s IL_0063
IL_0027: ldarg.0
IL_0028: ldc.i4.0
IL_0029: dup
IL_002a: stloc.0
IL_002b: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>1__state'
IL_0030: ldarg.0
IL_0031: ldloc.3
IL_0032: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>u__1'
IL_0037: ldarg.0
IL_0038: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_003d: ldloca.s V_3
IL_003f: ldarg.0
IL_0040: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::AwaitUnsafeOnCompleted<valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter, valuetype FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'>(!!0&, !!1&)
IL_0045: leave.s IL_00aa
IL_0047: ldarg.0
IL_0048: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>u__1'
IL_004d: stloc.3
IL_004e: ldarg.0
IL_004f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>u__1'
IL_0054: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
IL_005a: ldarg.0
IL_005b: ldc.i4.m1
IL_005c: dup
IL_005d: stloc.0
IL_005e: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>1__state'
IL_0063: ldloca.s V_3
IL_0065: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_006a: ldstr "Hello {0}"
IL_006f: ldloc.1
IL_0070: ldfld string FailFastAsync.Functions/'<>c__DisplayClass0_0'::name
IL_0075: call string [mscorlib]System.String::Format(string, object)
IL_007a: stloc.2
IL_007b: leave.s IL_0096
}
catch [mscorlib]System.Exception
{
IL_007d: stloc.s V_4
IL_007f: ldarg.0
IL_0080: ldc.i4.s -2
IL_0082: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>1__state'
IL_0087: ldarg.0
IL_0088: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_008d: ldloc.s V_4
IL_008f: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetException(class [mscorlib]System.Exception)
IL_0094: leave.s IL_00aa
}
IL_0096: ldarg.0
IL_0097: ldc.i4.s -2
IL_0099: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>1__state'
IL_009e: ldarg.0
IL_009f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_00a4: ldloc.2
IL_00a5: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetResult(!0)
IL_00aa: ret
}
.method private final hidebysig newslot virtual instance void SetStateMachine (
class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine
) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = (
01 00 00 00
)
.override method instance void [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_0000: ldarg.0
IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass0_0'/'<<FailFastAsyncUsingAnonymousFunction>b__0>d'::'<>t__builder'
IL_0006: ldarg.1
IL_0007: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_000c: ret
}
}
}
.class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass1_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
01 00 00 00
)
.field public string name
.method public hidebysig specialname rtspecialname instance void .ctor () cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
.method assembly hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1<string> '<FailFastAsyncUsingLocalFunction>g__core0' () cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = (
01 00 59 46 61 69 6c 46 61 73 74 41 73 79 6e 63
2e 46 75 6e 63 74 69 6f 6e 73 2b 3c 3e 63 5f 5f
44 69 73 70 6c 61 79 43 6c 61 73 73 31 5f 30 2b
3c 3c 46 61 69 6c 46 61 73 74 41 73 79 6e 63 55
73 69 6e 67 4c 6f 63 61 6c 46 75 6e 63 74 69 6f
6e 3e 67 5f 5f 63 6f 72 65 30 3e 64 00 00
)
.locals init (
[0] valuetype FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d' V_0,
[1] valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> V_1
)
IL_0000: ldloca.s V_0
IL_0002: ldarg.0
IL_0003: stfld class FailFastAsync.Functions/'<>c__DisplayClass1_0' FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>4__this'
IL_0008: ldloca.s V_0
IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::Create()
IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_0014: ldloca.s V_0
IL_0016: ldc.i4.m1
IL_0017: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>1__state'
IL_001c: ldloc.0
IL_001d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_0022: stloc.1
IL_0023: ldloca.s V_1
IL_0025: ldloca.s V_0
IL_0027: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::Start<valuetype FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'>(!!0&)
IL_002c: ldloca.s V_0
IL_002e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_0033: call instance class [mscorlib]System.Threading.Tasks.Task`1<string> valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::get_Task()
IL_0038: ret
}
.class nested private auto ansi sealed beforefieldinit '<<FailFastAsyncUsingLocalFunction>g__core0>d'
extends [mscorlib]System.ValueType
implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
{
.field public int32 '<>1__state'
.field public valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> '<>t__builder'
.field public class FailFastAsync.Functions/'<>c__DisplayClass1_0' '<>4__this'
.field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1'
.method private final hidebysig newslot virtual instance void MoveNext () cil managed
{
.override method instance void [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext()
.locals init (
[0] int32 V_0,
[1] class FailFastAsync.Functions/'<>c__DisplayClass1_0' V_1,
[2] string V_2,
[3] valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_3,
[4] class [mscorlib]System.Exception V_4
)
IL_0000: ldarg.0
IL_0001: ldfld int32 FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldarg.0
IL_0008: ldfld class FailFastAsync.Functions/'<>c__DisplayClass1_0' FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>4__this'
IL_000d: stloc.1
.try
{
IL_000e: ldloc.0
IL_000f: brfalse.s IL_0047
IL_0011: ldc.i4.s 10
IL_0013: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(int32)
IL_0018: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_001d: stloc.3
IL_001e: ldloca.s V_3
IL_0020: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted()
IL_0025: brtrue.s IL_0063
IL_0027: ldarg.0
IL_0028: ldc.i4.0
IL_0029: dup
IL_002a: stloc.0
IL_002b: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>1__state'
IL_0030: ldarg.0
IL_0031: ldloc.3
IL_0032: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>u__1'
IL_0037: ldarg.0
IL_0038: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_003d: ldloca.s V_3
IL_003f: ldarg.0
IL_0040: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::AwaitUnsafeOnCompleted<valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter, valuetype FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'>(!!0&, !!1&)
IL_0045: leave.s IL_00aa
IL_0047: ldarg.0
IL_0048: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>u__1'
IL_004d: stloc.3
IL_004e: ldarg.0
IL_004f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>u__1'
IL_0054: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
IL_005a: ldarg.0
IL_005b: ldc.i4.m1
IL_005c: dup
IL_005d: stloc.0
IL_005e: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>1__state'
IL_0063: ldloca.s V_3
IL_0065: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_006a: ldstr "Hello {0}"
IL_006f: ldloc.1
IL_0070: ldfld string FailFastAsync.Functions/'<>c__DisplayClass1_0'::name
IL_0075: call string [mscorlib]System.String::Format(string, object)
IL_007a: stloc.2
IL_007b: leave.s IL_0096
}
catch [mscorlib]System.Exception
{
IL_007d: stloc.s V_4
IL_007f: ldarg.0
IL_0080: ldc.i4.s -2
IL_0082: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>1__state'
IL_0087: ldarg.0
IL_0088: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_008d: ldloc.s V_4
IL_008f: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetException(class [mscorlib]System.Exception)
IL_0094: leave.s IL_00aa
}
IL_0096: ldarg.0
IL_0097: ldc.i4.s -2
IL_0099: stfld int32 FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>1__state'
IL_009e: ldarg.0
IL_009f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_00a4: ldloc.2
IL_00a5: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetResult(!0)
IL_00aa: ret
}
.method private final hidebysig newslot virtual instance void SetStateMachine (
class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine
) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = (
01 00 00 00
)
.override method instance void [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_0000: ldarg.0
IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<>c__DisplayClass1_0'/'<<FailFastAsyncUsingLocalFunction>g__core0>d'::'<>t__builder'
IL_0006: ldarg.1
IL_0007: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_000c: ret
}
}
}
.class nested private auto ansi sealed beforefieldinit '<FailFastAsyncUsingMethodCore>d__3'
extends [mscorlib]System.ValueType
implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
01 00 00 00
)
.field public int32 '<>1__state'
.field public valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> '<>t__builder'
.field public string name
.field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1'
.method private final hidebysig newslot virtual instance void MoveNext () cil managed
{
.override method instance void [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext()
.locals init (
[0] int32 V_0,
[1] string V_1,
[2] valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_2,
[3] class [mscorlib]System.Exception V_3
)
IL_0000: ldarg.0
IL_0001: ldfld int32 FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>1__state'
IL_0006: stloc.0
.try
{
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0040
IL_000a: ldc.i4.s 10
IL_000c: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(int32)
IL_0011: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_0016: stloc.2
IL_0017: ldloca.s V_2
IL_0019: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted()
IL_001e: brtrue.s IL_005c
IL_0020: ldarg.0
IL_0021: ldc.i4.0
IL_0022: dup
IL_0023: stloc.0
IL_0024: stfld int32 FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>1__state'
IL_0029: ldarg.0
IL_002a: ldloc.2
IL_002b: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>u__1'
IL_0030: ldarg.0
IL_0031: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_0036: ldloca.s V_2
IL_0038: ldarg.0
IL_0039: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::AwaitUnsafeOnCompleted<valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter, valuetype FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'>(!!0&, !!1&)
IL_003e: leave.s IL_00a1
IL_0040: ldarg.0
IL_0041: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>u__1'
IL_0046: stloc.2
IL_0047: ldarg.0
IL_0048: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>u__1'
IL_004d: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
IL_0053: ldarg.0
IL_0054: ldc.i4.m1
IL_0055: dup
IL_0056: stloc.0
IL_0057: stfld int32 FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>1__state'
IL_005c: ldloca.s V_2
IL_005e: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_0063: ldstr "Hello {0}"
IL_0068: ldarg.0
IL_0069: ldfld string FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::name
IL_006e: call string [mscorlib]System.String::Format(string, object)
IL_0073: stloc.1
IL_0074: leave.s IL_008d
}
catch [mscorlib]System.Exception
{
IL_0076: stloc.3
IL_0077: ldarg.0
IL_0078: ldc.i4.s -2
IL_007a: stfld int32 FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>1__state'
IL_007f: ldarg.0
IL_0080: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_0085: ldloc.3
IL_0086: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetException(class [mscorlib]System.Exception)
IL_008b: leave.s IL_00a1
}
IL_008d: ldarg.0
IL_008e: ldc.i4.s -2
IL_0090: stfld int32 FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>1__state'
IL_0095: ldarg.0
IL_0096: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_009b: ldloc.1
IL_009c: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetResult(!0)
IL_00a1: ret
}
.method private final hidebysig newslot virtual instance void SetStateMachine (
class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine
) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = (
01 00 00 00
)
.override method instance void [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_0000: ldarg.0
IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string> FailFastAsync.Functions/'<FailFastAsyncUsingMethodCore>d__3'::'<>t__builder'
IL_0006: ldarg.1
IL_0007: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_000c: ret
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment