async-net7-vs-netcoreapp2
54 removals
203 lines
644 additions
791 lines
C:/Rider/pose/src/Sandbox/bin/Debug/net7.0/Sandbox.exe
"C:\Program Files\dotnet\dotnet.exe" C:/Rider/pose/src/Sandbox/bin/Debug/netcoreapp2.0/Sandbox.dll
----------------------------- Rewriting -----------------------------
----------------------------- Rewriting -----------------------------
Void <Main>b__5_2()
Void <Main>b__5_2()
IL_0000: nop
IL_0000: nop
IL_0001: ldstr "abc"
IL_0001: ldstr "abc"
IL_0006: call System.Threading.Tasks.Task`1[System.Int32] AsyncContext(System.St
IL_0006: call System.Threading.Tasks.Task`1[System.Int32] AsyncContext(System.St
ring)
ring)
IL_000b: callvirt System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] Ge
IL_000b: callvirt System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] Ge
tAwaiter()
tAwaiter()
System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] GetAwaiter()
System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] GetAwaiter()
IL_0010: stloc.1
IL_0010: stloc.1
IL_0011: ldloca.s System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] (1
IL_0011: ldloca.s System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] (1
)
)
IL_0013: call Int32 GetResult()
IL_0013: call Int32 GetResult()
IL_0018: stloc.0
IL_0018: stloc.0
IL_0019: ret
IL_0019: ret
Void impl_Pose.Sandbox.Program+<>c_<Main>b__5_2(<>c)
Void impl_Pose.Sandbox.Program+<>c_<Main>b__5_2(<>c)
IL_0000: nop
IL_0000: nop
IL_0001: ldstr "abc"
IL_0001: ldstr "abc"
IL_0006: call System.Threading.Tasks.Task`1[System.Int32] stub_call_Pose.Sandbox
IL_0006: call System.Threading.Tasks.Task`1[System.Int32] stub_call_Pose.Sandbox
.Program_AsyncContext(System.String)
.Program_AsyncContext(System.String)
IL_000b: call System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] stub_c
IL_000b: call System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] stub_c
allvirt_System.Threading.Tasks.Task`1[System.Int32]_GetAwaiter(System.Threading.
allvirt_System.Threading.Tasks.Task`1[System.Int32]_GetAwaiter(System.Threading.
Tasks.Task`1[System.Int32])
Tasks.Task`1[System.Int32])
IL_0010: stloc.1
IL_0010: stloc.1
IL_0011: ldloca.s System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] (1
IL_0011: ldloca.s System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] (1
)
)
IL_0013: call Int32 stub_call_System.Runtime.CompilerServices.TaskAwaiter`1[Syst
IL_0013: call Int32 stub_call_System.Runtime.CompilerServices.TaskAwaiter`1[Syst
em.Int32]_GetResult(System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32]
em.Int32]_GetResult(System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32]
ByRef)
ByRef)
IL_0018: stloc.0
IL_0018: stloc.0
IL_0019: ret
IL_0019: ret
----------------------------- Invoking -----------------------------
----------------------------- Invoking -----------------------------
System.Threading.Tasks.Task`1[System.Int32] AsyncContext(System.String)
System.Threading.Tasks.Task`1[System.Int32] AsyncContext(System.String)
IL_0000: newobj Void .ctor()
IL_0000: newobj Void .ctor()
IL_0005: stloc.0
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0006: ldloc.0
IL_0007: call System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.In
IL_0007: call System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.In
t32] Create()
t32] Create()
IL_000c: stfld System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.I
IL_000c: stfld System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.I
nt32] <>t__builder
nt32] <>t__builder
IL_0011: ldloc.0
IL_0011: ldloc.0
IL_0012: ldarg.0
IL_0012: ldarg.0
IL_0013: stfld System.String st
IL_0013: stfld System.String st
IL_0018: ldloc.0
IL_0018: ldloc.0
IL_0019: ldc.i4.m1
IL_0019: ldc.i4.m1
IL_001a: stfld Int32 <>1__state
IL_001a: stfld Int32 <>1__state
IL_001f: ldloc.0
IL_001f: ldloc.0
IL_0020: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
IL_0020: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
Int32] <>t__builder
IL_0025: ldloca.s Pose.Sandbox.Program+<AsyncContext>d__4 (0)
IL_0025: ldloca.s Pose.Sandbox.Program+<AsyncContext>d__4 (0)
IL_0027: call Void Start[<AsyncContext>d__4](<AsyncContext>d__4 ByRef)
IL_0027: call Void Start[<AsyncContext>d__4](<AsyncContext>d__4 ByRef)
IL_002c: ldloc.0
IL_002c: ldloc.0
IL_002d: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
IL_002d: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
Int32] <>t__builder
IL_0032: call System.Threading.Tasks.Task`1[System.Int32] get_Task()
IL_0032: call System.Threading.Tasks.Task`1[System.Int32] get_Task()
IL_0037: ret
IL_0037: ret
System.Threading.Tasks.Task`1[System.Int32] impl_Pose.Sandbox.Program_AsyncConte
System.Threading.Tasks.Task`1[System.Int32] impl_Pose.Sandbox.Program_AsyncConte
xt(System.String)
xt(System.String)
IL_0000: call <AsyncContext>d__4 stub_newobj_Pose.Sandbox.Program+<AsyncContext>
IL_0000: call <AsyncContext>d__4 stub_newobj_Pose.Sandbox.Program+<AsyncContext>
d__4_.ctor()
d__4_.ctor()
IL_0005: stloc.0
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0006: ldloc.0
IL_0007: call System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.In
IL_0007: call System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.In
t32] stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.I
t32] stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.I
nt32]_Create()
nt32]_Create()
IL_000c: stfld System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.I
IL_000c: stfld System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.I
nt32] <>t__builder
nt32] <>t__builder
IL_0011: ldloc.0
IL_0011: ldloc.0
IL_0012: ldarg.0
IL_0012: ldarg.0
IL_0013: stfld System.String st
IL_0013: stfld System.String st
IL_0018: ldloc.0
IL_0018: ldloc.0
IL_0019: ldc.i4.m1
IL_0019: ldc.i4.m1
IL_001a: stfld Int32 <>1__state
IL_001a: stfld Int32 <>1__state
IL_001f: ldloc.0
IL_001f: ldloc.0
IL_0020: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
IL_0020: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
Int32] <>t__builder
IL_0025: ldloca.s Pose.Sandbox.Program+<AsyncContext>d__4 (0)
IL_0025: ldloca.s Pose.Sandbox.Program+<AsyncContext>d__4 (0)
IL_0027: call Void stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuil
IL_0027: call Void stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuil
der`1[System.Int32]_Start[<AsyncContext>d__4](System.Runtime.CompilerServices.As
der`1[System.Int32]_Start[<AsyncContext>d__4](System.Runtime.CompilerServices.As
yncTaskMethodBuilder`1[System.Int32] ByRef, <AsyncContext>d__4 ByRef)
yncTaskMethodBuilder`1[System.Int32] ByRef, <AsyncContext>d__4 ByRef)
IL_002c: ldloc.0
IL_002c: ldloc.0
IL_002d: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
IL_002d: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
Int32] <>t__builder
IL_0032: call System.Threading.Tasks.Task`1[System.Int32] stub_call_System.Runti
IL_0032: call System.Threading.Tasks.Task`1[System.Int32] stub_call_System.Runti
me.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32]_get_Task(System.Runti
me.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32]_get_Task(System.Runti
me.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] ByRef)
me.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] ByRef)
IL_0037: ret
IL_0037: ret
Void .ctor()
Void .ctor()
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: call Void .ctor()
IL_0001: call Void .ctor()
IL_0006: nop
IL_0006: nop
IL_0007: ret
IL_0007: ret
Void impl_Pose.Sandbox.Program+<AsyncContext>d__4_.ctor(<AsyncContext>d__4)
Void impl_Pose.Sandbox.Program+<AsyncContext>d__4_.ctor(<AsyncContext>d__4)
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: call Void stub_call_System.Object_.ctor(System.Object)
IL_0001: call Void stub_call_System.Object_.ctor(System.Object)
IL_0006: nop
IL_0006: nop
IL_0007: ret
IL_0007: ret
Void .ctor()
Void .ctor()
IL_0000: ret
IL_0000: ret
Void impl_System.Object_.ctor(System.Object)
Void impl_System.Object_.ctor(System.Object)
IL_0000: ret
IL_0000: ret
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] Create()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] Create()
IL_0000: ldloca.s System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[Syste
IL_0000: ldloca.s System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[Syste
m.Int32] (0)
m.Int32] (0)
IL_0002: initobj System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System
IL_0002: initobj System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System
.Int32]
.Int32]
IL_0008: ldloc.0
IL_0008: ldloc.0
IL_0009: ret
IL_0009: ret
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] impl_Syst
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] impl_Syst
em.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32]_Create()
em.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32]_Create()
IL_0000: ldloca.s System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[Syste
IL_0000: ldloca.s System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[Syste
m.Int32] (0)
m.Int32] (0)
IL_0002: initobj System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System
IL_0002: initobj System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System
.Int32]
.Int32]
IL_0008: ldloc.0
IL_0008: ldloc.0
IL_0009: ret
IL_0009: ret
Void Start[<AsyncContext>d__4](<AsyncContext>d__4 ByRef)
Void Start[<AsyncContext>d__4](<AsyncContext>d__4 ByRef)
IL_0000: ldarg.1
IL_0000: ldarg.1
IL_0001: call Void Start[<AsyncContext>d__4](<AsyncContext>d__4 ByRef)
IL_0001: ldobj Pose.Sandbox.Program+<AsyncContext>d__4
IL_0006: ret
IL_0006: box Pose.Sandbox.Program+<AsyncContext>d__4
IL_000b: brtrue.s IL_0014
IL_000d: ldc.i4.s 73
IL_000f: call Void ThrowArgumentNullException(System.ExceptionArgument)
IL_0014: call System.Threading.Thread get_CurrentThread()
IL_0019: stloc.0
IL_001a: ldloca.s System.Threading.ExecutionContextSwitcher (1)
IL_001c: initobj System.Threading.ExecutionContextSwitcher
IL_0022: ldloc.0
IL_0023: ldloca.s System.Threading.ExecutionContextSwitcher (1)
IL_0025: call Void EstablishCopyOnWriteScope(System.Threading.Thread, System.Thr
eading.ExecutionContextSwitcher ByRef)
IL_002a: ldarg.1
IL_002b: constrained. Pose.Sandbox.Program+<AsyncContext>d__4
IL_0031: callvirt Void MoveNext()
IL_0036: leave.s IL_0041
IL_0038: ldloca.s System.Threading.ExecutionContextSwitcher (1)
IL_003a: ldloc.0
IL_003b: call Void Undo(System.Threading.Thread)
IL_0040: endfinally
IL_0041: ret
Void impl_System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32]
Void impl_System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32]
_Start[<AsyncContext>d__4](System.Runtime.CompilerServices.AsyncTaskMethodBuilde
_Start[<AsyncContext>d__4](System.Runtime.CompilerServices.AsyncTaskMethodBuilde
r`1[System.Int32] ByRef, <AsyncContext>d__4 ByRef)
r`1[System.Int32] ByRef, <AsyncContext>d__4 ByRef)
IL_0000: ldarg.1
IL_0000: ldarg.1
IL_0001: call Void Start[<AsyncContext>d__4](<AsyncContext>d__4 ByRef)
IL_0001: ldobj Pose.Sandbox.Program+<AsyncContext>d__4
IL_0006: ret
IL_0006: box Pose.Sandbox.Program+<AsyncContext>d__4
Started StaticMethod()
IL_000b: brtrue IL_0017
Value produced: 3
IL_0010: ldc.i4.s 73
IL_0012: call Void ThrowArgumentNullException(System.ExceptionArgument)
IL_0017: call System.Threading.Thread get_CurrentThread()
IL_001c: stloc.0
IL_001d: ldloca.s System.Threading.ExecutionContextSwitcher (1)
IL_001f: initobj System.Threading.ExecutionContextSwitcher
IL_0025: ldloc.0
IL_0026: ldloca.s System.Threading.ExecutionContextSwitcher (1)
IL_0028: call Void EstablishCopyOnWriteScope(System.Threading.Thread, System.Thr
eading.ExecutionContextSwitcher ByRef)
IL_002d: ldarg.1
IL_002e: call Void stub_callvirt_System.Runtime.CompilerServices.IAsyncStateMach
ine_MoveNext(<AsyncContext>d__4 ByRef)
IL_0033: leave IL_0041
IL_0038: ldloca.s System.Threading.ExecutionContextSwitcher (1)
IL_003a: ldloc.0
IL_003b: call Void Undo(System.Threading.Thread)
IL_0040: endfinally
IL_0041: ret
System.Threading.Tasks.Task`1[System.Int32] get_Task()
Void MoveNext()
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: ldfld System.Threading.Tasks.Task`1[System.Int32] m_task
IL_0001: ldfld Int32 <>1__state
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_000c
IL_000a: br.s IL_000e
IL_000c: br.s IL_0083
IL_000e: nop
IL_000f: ldstr "Started StaticMethod()"
IL_0014: call Void WriteLine(System.String)
IL_0019: nop
IL_001a: ldarg.0
IL_001b: ldarg.0
IL_001c: ldfld System.String st
IL_0021: call Int32 GetCount(System.String)
IL_0026: stfld Int32 <value>5__1
IL_002b: ldstr "Value produced: "
IL_0030: ldarg.0
IL_0031: ldflda Int32 <value>5__1
IL_0036: call System.String ToString()
IL_003b: call System.String Concat(System.String, System.String)
IL_0040: call Void WriteLine(System.String)
IL_0045: nop
IL_0046: ldc.i4 1000
IL_004b: call System.Threading.Tasks.Task Delay(Int32)
IL_0050: callvirt System.Runtime.CompilerServices.TaskAwaiter GetAwaiter()
System.Runtime.CompilerServices.TaskAwaiter GetAwaiter()
IL_0055: stloc.2
IL_0056: ldloca.s System.Runtime.CompilerServices.TaskAwaiter (2)
IL_0058: call Boolean get_IsCompleted()
IL_005d: brtrue.s IL_009f
IL_005f: ldarg.0
IL_0060: ldc.i4.0
IL_0061: dup
IL_0062: stloc.0
IL_0063: stfld Int32 <>1__state
IL_0068: ldarg.0
IL_0069: ldloc.2
IL_006a: stfld System.Runtime.CompilerServices.TaskAwaiter <>u__1
IL_006f: ldarg.0
IL_0070: stloc.3
IL_0071: ldarg.0
IL_0072: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
IL_0077: ldloca.s System.Runtime.CompilerServices.TaskAwaiter (2)
IL_0079: ldloca.s Pose.Sandbox.Program+<AsyncContext>d__4 (3)
IL_007b: call Void AwaitUnsafeOnCompleted[TaskAwaiter,<AsyncContext>d__4](System
.Runtime.CompilerServices.TaskAwaiter ByRef, <AsyncContext>d__4 ByRef)
IL_0080: nop
IL_0081: leave.s IL_00e5
IL_0083: ldarg.0
IL_0084: ldfld System.Runtime.CompilerServices.TaskAwaiter <>u__1
IL_0089: stloc.2
IL_008a: ldarg.0
IL_008b: ldflda System.Runtime.CompilerServices.TaskAwaiter <>u__1
IL_0090: initobj System.Runtime.CompilerServices.TaskAwaiter
IL_0096: ldarg.0
IL_0097: ldc.i4.m1
IL_0098: dup
IL_0099: stloc.0
IL_009a: stfld Int32 <>1__state
IL_009f: ldloca.s System.Runtime.CompilerServices.TaskAwaiter (2)
IL_00a1: call Void GetResult()
IL_00a6: nop
IL_00a7: ldstr "Completed StaticMethod()"
IL_00ac: call Void WriteLine(System.String)
IL_00b1: nop
IL_00b2: ldc.i4.1
IL_00b3: stloc.1
IL_00b4: leave.s IL_00d0
IL_00b6: stloc.s System.Exception (4)
IL_00b8: ldarg.0
IL_00b9: ldc.i4.s -2
IL_00bb: stfld Int32 <>1__state
IL_00c0: ldarg.0
IL_00c1: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
IL_00c6: ldloc.s System.Exception (4)
IL_00c8: call Void SetException(System.Exception)
IL_00cd: nop
IL_00ce: leave.s IL_00e5
IL_00d0: ldarg.0
IL_00d1: ldc.i4.s -2
IL_00d3: stfld Int32 <>1__state
IL_00d8: ldarg.0
IL_00d9: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
IL_00de: ldloc.1
IL_00df: call Void SetResult(Int32)
IL_00e4: nop
IL_00e5: ret
Void impl_Pose.Sandbox.Program+<AsyncContext>d__4_MoveNext(<AsyncContext>d__4)
IL_0000: ldarg.0
IL_0001: ldfld Int32 <>1__state
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse IL_0012
IL_000d: br IL_0017
IL_0012: br IL_008d
IL_0017: nop
IL_0018: ldstr "Started StaticMethod()"
IL_001d: call Void stub_call_System.Console_WriteLine(System.String)
IL_0022: nop
IL_0023: ldarg.0
IL_0024: ldarg.0
IL_0025: ldfld System.String st
IL_002a: call Int32 stub_call_Pose.Sandbox.TestExtensions_GetCount(System.String
)
IL_002f: stfld Int32 <value>5__1
IL_0034: ldstr "Value produced: "
IL_0039: ldarg.0
IL_003a: ldflda Int32 <value>5__1
IL_003f: call System.String stub_call_System.Int32_ToString(Int32 ByRef)
IL_0044: call System.String stub_call_System.String_Concat(System.String, System
.String)
IL_0049: call Void stub_call_System.Console_WriteLine(System.String)
IL_004e: nop
IL_004f: ldc.i4 1000
IL_0054: call System.Threading.Tasks.Task stub_call_System.Threading.Tasks.Task_
Delay(Int32)
IL_0059: call System.Runtime.CompilerServices.TaskAwaiter stub_callvirt_System.T
hreading.Tasks.Task_GetAwaiter(System.Threading.Tasks.Task)
IL_005e: stloc.2
IL_005f: ldloca.s System.Runtime.CompilerServices.TaskAwaiter (2)
IL_0061: call Boolean stub_call_System.Runtime.CompilerServices.TaskAwaiter_get_
IsCompleted(System.Runtime.CompilerServices.TaskAwaiter ByRef)
IL_0066: brtrue IL_00a9
IL_006b: ldarg.0
IL_006c: ldc.i4.0
IL_006d: dup
IL_006e: stloc.0
IL_006f: stfld Int32 <>1__state
IL_0074: ldarg.0
IL_0075: ldloc.2
IL_0076: stfld System.Runtime.CompilerServices.TaskAwaiter <>u__1
IL_007b: ldarg.0
IL_007c: stloc.3
IL_007d: ldarg.0
IL_007e: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
IL_0083: ldloca.s System.Runtime.CompilerServices.TaskAwaiter (2)
IL_0085: ldloca.s Pose.Sandbox.Program+<AsyncContext>d__4 (3)
IL_0087: call Void stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuil
der`1[System.Int32]_AwaitUnsafeOnCompleted[TaskAwaiter,<AsyncContext>d__4](Syste
m.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Int32] ByRef, System.
Runtime.CompilerServices.TaskAwaiter ByRef, <AsyncContext>d__4 ByRef)
IL_008c: nop
IL_008d: ldarg.0
IL_008e: ldfld System.Runtime.CompilerServices.TaskAwaiter <>u__1
IL_0093: stloc.2
IL_0094: ldarg.0
IL_0095: ldflda System.Runtime.CompilerServices.TaskAwaiter <>u__1
IL_009a: initobj System.Runtime.CompilerServices.TaskAwaiter
IL_00a0: ldarg.0
IL_00a1: ldc.i4.m1
IL_00a2: dup
IL_00a3: stloc.0
IL_00a4: stfld Int32 <>1__state
IL_00a9: ldloca.s System.Runtime.CompilerServices.TaskAwaiter (2)
IL_00ab: call Void stub_call_System.Runtime.CompilerServices.TaskAwaiter_GetResu
lt(System.Runtime.CompilerServices.TaskAwaiter ByRef)
IL_00b0: nop
IL_00b1: ldstr "Completed StaticMethod()"
IL_00b6: call Void stub_call_System.Console_WriteLine(System.String)
IL_00bb: nop
IL_00bc: ldc.i4.1
IL_00bd: stloc.1
IL_00be: leave IL_00e0
IL_00c3: stloc.s System.Exception (4)
IL_00c5: ldarg.0
IL_00c6: ldc.i4.s -2
IL_00c8: stfld Int32 <>1__state
IL_00cd: ldarg.0
IL_00ce: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
IL_00d3: ldloc.s System.Exception (4)
IL_00d5: call Void stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuil
der`1[System.Int32]_SetException(System.Runtime.CompilerServices.AsyncTaskMethod
Builder`1[System.Int32] ByRef, System.Exception)
IL_00da: nop
IL_00db: leave IL_00e0
IL_00e0: ldarg.0
IL_00e1: ldc.i4.s -2
IL_00e3: stfld Int32 <>1__state
IL_00e8: ldarg.0
IL_00e9: ldflda System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.
Int32] <>t__builder
IL_00ee: ldloc.1
IL_00ef: call Void stub_call_System.Runtime.CompilerServices.AsyncTaskMethodBuil
der`1[System.Int32]_SetResult(System.Runtime.CompilerServices.AsyncTaskMethodBui
lder`1[System.Int32] ByRef, Int32)
IL_00f4: nop
IL_00f5: ret
Void WriteLine(System.String)
IL_0000: call System.IO.TextWriter get_Out()
IL_0005: ldarg.0
IL_0006: callvirt Void WriteLine(System.String)
Void WriteLine(System.String)
IL_000b: ret
Void impl_System.Console_WriteLine(System.String)
IL_0000: call System.IO.TextWriter stub_call_System.Console_get_Out()
IL_0005: ldarg.0
IL_0006: call Void stub_callvirt_System.IO.TextWriter_WriteLine(System.IO.TextWr
iter, System.String)
IL_000b: ret
System.IO.TextWriter get_Out()
IL_0000: ldsflda System.IO.TextWriter s_out
IL_0005: ldsfld System.Func`1[System.IO.TextWriter] <>9__25_0
IL_000a: dup
IL_000b: brtrue.s IL_0024
IL_000d: pop
IL_000e: ldsfld <>c <>9
IL_0013: ldftn System.IO.TextWriter <get_Out>b__25_0()
IL_0019: newobj Void .ctor(System.Object, IntPtr)
IL_001e: dup
IL_001f: stsfld System.Func`1[System.IO.TextWriter] <>9__25_0
IL_0024: call System.IO.TextWriter EnsureInitialized[TextWriter](System.IO.TextW
riter ByRef, System.Func`1[System.IO.TextWriter])
IL_0029: ret
System.IO.TextWriter impl_System.Console_get_Out()
IL_0000: ldsflda System.IO.TextWriter s_out
IL_0005: ldsfld System.Func`1[System.IO.TextWriter] <>9__25_0
IL_000a: dup
IL_000b: brtrue IL_0026
IL_0010: pop
IL_0011: ldsfld <>c <>9
IL_0016: call IntPtr stub_ldftn_System.Console+<>c_<get_Out>b__25_0()
IL_001b: call System.Func`1[System.IO.TextWriter] stub_newobj_System.Func`1[Syst
em.IO.TextWriter]_.ctor(System.Object, IntPtr)
IL_0020: dup
IL_0021: stsfld System.Func`1[System.IO.TextWriter] <>9__25_0
IL_0026: call System.IO.TextWriter stub_call_System.Console_EnsureInitialized[Te
xtWriter](System.IO.TextWriter ByRef, System.Func`1[System.IO.TextWriter])
IL_002b: ret
System.IO.TextWriter EnsureInitialized[TextWriter](System.IO.TextWriter ByRef, S
ystem.Func`1[System.IO.TextWriter])
IL_0000: ldarg.0
IL_0001: ldsflda System.Object InternalSyncObject
IL_0006: ldarg.1
IL_0007: call System.IO.TextWriter EnsureInitialized[TextWriter](System.IO.TextW
riter ByRef, System.Object ByRef, System.Func`1[System.IO.TextWriter])
IL_000c: ret
System.IO.TextWriter impl_System.Console_EnsureInitialized[TextWriter](System.IO
.TextWriter ByRef, System.Func`1[System.IO.TextWriter])
IL_0000: ldarg.0
IL_0001: ldsflda System.Object InternalSyncObject
IL_0006: ldarg.1
IL_0007: call System.IO.TextWriter stub_call_System.Threading.LazyInitializer_En
sureInitialized[TextWriter](System.IO.TextWriter ByRef, System.Object ByRef, Sys
tem.Func`1[System.IO.TextWriter])
IL_000c: ret
System.IO.TextWriter EnsureInitialized[TextWriter](System.IO.TextWriter ByRef, S
ystem.Object ByRef, System.Func`1[System.IO.TextWriter])
IL_0000: ldarg.0
IL_0001: call System.IO.TextWriter Read[TextWriter](System.IO.TextWriter ByRef)
IL_0006: dup
IL_0006: dup
IL_0007: brtrue.s IL_0010
IL_0007: box System.IO.TextWriter
IL_0009: pop
IL_000c: brtrue.s IL_0017
IL_000a: ldarg.0
IL_000e: pop
IL_000b: call System.Threading.Tasks.Task`1[System.Int32] InitializeTaskAsPromis
IL_000f: ldarg.0
e()
IL_0010: ldarg.1
IL_0010: ret
IL_0011: ldarg.2
IL_0012: call System.IO.TextWriter EnsureInitializedCore[TextWriter](System.IO.T
extWriter ByRef, System.Object ByRef, System.Func`1[System.IO.TextWriter])
IL_0017: ret
System.Threading.Tasks.Task`1[System.Int32] impl_System.Runtime.CompilerServices
System.IO.TextWriter impl_System.Threading.LazyInitializer_EnsureInitialized[Tex
.AsyncTaskMethodBuilder`1[System.Int32]_get_Task(System.Runtime.CompilerServices
tWriter](System.IO.TextWriter ByRef, System.Object ByRef, System.Func`1[System.I
.AsyncTaskMethodBuilder`1[System.Int32] ByRef)
O.TextWriter])
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: ldfld System.Threading.Tasks.Task`1[System.Int32] m_task
IL_0001: call System.IO.TextWriter stub_call_System.Threading.Volatile_Read[Text
Writer](System.IO.TextWriter ByRef)
IL_0006: dup
IL_0006: dup
IL_0007: brtrue IL_0013
IL_0007: box System.IO.TextWriter
IL_000c: pop
IL_000c: brtrue IL_001a
IL_000d: ldarg.0
IL_0011: pop
IL_000e: call System.Threading.Tasks.Task`1[System.Int32] InitializeTaskAsPromis
IL_0012: ldarg.0
e()
IL_0013: ldarg.1
IL_0013: ret
IL_0014: ldarg.2
IL_0015: call System.IO.TextWriter EnsureInitializedCore[TextWriter](System.IO.T
extWriter ByRef, System.Object ByRef, System.Func`1[System.IO.TextWriter])
IL_001a: ret
System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] GetAwaiter()
System.IO.TextWriter Read[TextWriter](System.IO.TextWriter ByRef)
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: newobj Void .ctor(System.Threading.Tasks.Task`1[System.Int32])
IL_0001: ldobj System.IO.TextWriter
IL_0006: ret
IL_0006: stloc.0
IL_0007: call Void MemoryBarrier()
IL_000c: ldloc.0
IL_000d: ret
System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] impl_System.Threadin
System.IO.TextWriter impl_System.Threading.Volatile_Read[TextWriter](System.IO.T
g.Tasks.Task`1[System.Int32]_GetAwaiter(System.Threading.Tasks.Task`1[System.Int
extWriter ByRef)
32])
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: newobj Void .ctor(System.Threading.Tasks.Task`1[System.Int32])
IL_0001: ldobj System.IO.TextWriter
IL_0006: ret
IL_0006: stloc.0
IL_0007: call Void stub_call_System.Threading.Interlocked_MemoryBarrier()
IL_000c: ldloc.0
IL_000d: ret
Int32 GetResult()
Void WriteLine(System.String)
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: ldfld System.Threading.Tasks.Task`1[System.Int32] m_task
IL_0001: stloc.0
IL_0006: call Void ValidateEnd(System.Threading.Tasks.Task)
IL_0002: ldc.i4.0
IL_000b: ldarg.0
IL_0003: stloc.1
IL_000c: ldfld System.Threading.Tasks.Task`1[System.Int32] m_task
IL_0004: ldloc.0
IL_0011: callvirt Int32 get_ResultOnSuccess()
IL_0005: ldloca.s System.Boolean (1)
IL_0016: ret
IL_0007: call Void Enter(System.Object, Boolean ByRef)
IL_000c: ldarg.0
IL_000d: ldfld System.IO.TextWriter _out
IL_0012: ldarg.1
IL_0013: callvirt Void WriteLine(System.String)
Int32 impl_System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32]_GetResult
Void WriteLine(System.String)
(System.Runtime.CompilerServices.TaskAwaiter`1[System.Int32] ByRef)
IL_0018: leave.s IL_0024
IL_001a: ldloc.1
IL_001b: brfalse.s IL_0023
IL_001d: ldloc.0
IL_001e: call Void Exit(System.Object)
IL_0023: endfinally
IL_0024: ret
Void impl_System.IO.SyncTextWriter_WriteLine(System.IO.SyncTextWriter, System.St
ring)
IL_0000: ldarg.0
IL_0000: ldarg.0
IL_0001: ldfld System.Threading.Tasks.Task`1[System.Int32] m_task
IL_0001: stloc.0
IL_0006: call Void ValidateEnd(System.Threading.Tasks.Task)
IL_0002: ldc.i4.0
IL_000b: ldarg.0
IL_0003: stloc.1
IL_000c: ldfld System.Threading.Tasks.Task`1[System.Int32] m_task
IL_0004: ldloc.0
IL_0011: callvirt Int32 get_ResultOnSuccess()
IL_0005: ldloca.s System.Boolean (1)
IL_0016: ret
IL_0007: call Void stub_call_System.Threading.Monitor_Enter(System.Object, Boole
Completed StaticMethod()
an ByRef)
Finished
IL_000c: ldarg.0
IL_000d: ldfld System.IO.TextWriter _out
IL_0012: ldarg.1
IL_0013: call Void stub_callvirt_System.IO.TextWriter_WriteLine(System.IO.TextWr
iter, System.String)
IL_0018: leave IL_002a
IL_001d: ldloc.1
IL_001e: brfalse IL_0029
IL_0023: ldloc.0
IL_0024: call Void stub_call_System.Threading.Monitor_Exit(System.Object)
IL_0029: endfinally
IL_002a: ret
Process finished with exit code 0.
Void Enter(System.Object, Boolean ByRef)
IL_0000: ldarg.1
IL_0001: ldind.u1
IL_0002: brfalse.s IL_0009
IL_0004: call Void ThrowLockTakenException()
IL_0009: ldarg.0
IL_000a: ldarg.1
IL_000b: call Void ReliableEnter(System.Object, Boolean ByRef)
IL_0010: ret
Void impl_System.Threading.Monitor_Enter(System.Object, Boolean ByRef)
IL_0000: ldarg.1
IL_0001: ldind.u1
IL_0002: brfalse IL_000c
IL_0007: call Void ThrowLockTakenException()
IL_000c: ldarg.0
IL_000d: ldarg.1
IL_000e: call Void ReliableEnter(System.Object, Boolean ByRef)
IL_0013: ret
Void WriteLine(System.String)
IL_0000: ldarg.1
IL_0001: brtrue.s IL_000a
IL_0003: ldsfld System.String Empty
IL_0008: starg.s System.String value
IL_000a: ldarg.0
IL_000b: call Void CheckAsyncTaskInProgress()
IL_0010: ldarg.1
IL_0011: callvirt Int32 get_Length()
Int32 get_Length()
IL_0016: stloc.0
IL_0017: ldc.i4.0
IL_0018: stloc.1
IL_0019: br.s IL_006f
IL_001b: ldarg.0
IL_001c: ldfld Int32 _charPos
IL_0021: ldarg.0
IL_0022: ldfld Int32 _charLen
IL_0027: bne.un.s IL_0031
IL_0029: ldarg.0
IL_002a: ldc.i4.0
IL_002b: ldc.i4.0
IL_002c: call Void Flush(Boolean, Boolean)
IL_0031: ldarg.0
IL_0032: ldfld Int32 _charLen
IL_0037: ldarg.0
IL_0038: ldfld Int32 _charPos
IL_003d: sub
IL_003e: stloc.3
IL_003f: ldloc.3
IL_0040: ldloc.0
IL_0041: ble.s IL_0045
IL_0043: ldloc.0
IL_0044: stloc.3
IL_0045: ldarg.1
IL_0046: ldloc.1
IL_0047: ldarg.0
IL_0048: ldfld Char[] _charBuffer
IL_004d: ldarg.0
IL_004e: ldfld Int32 _charPos
IL_0053: ldloc.3
IL_0054: callvirt Void CopyTo(Int32, Char[], Int32, Int32)
Void CopyTo(Int32, Char[], Int32, Int32)
IL_0059: ldarg.0
IL_005a: ldarg.0
IL_005b: ldfld Int32 _charPos
IL_0060: ldloc.3
IL_0061: add
IL_0062: stfld Int32 _charPos
IL_0067: ldloc.1
IL_0068: ldloc.3
IL_0069: add
IL_006a: stloc.1
IL_006b: ldloc.0
IL_006c: ldloc.3
IL_006d: sub
IL_006e: stloc.0
IL_006f: ldloc.0
IL_0070: ldc.i4.0
IL_0071: bgt.s IL_001b
IL_0073: ldarg.0
IL_0074: ldfld Char[] CoreNewLine
IL_0079: stloc.2
IL_007a: ldc.i4.0
IL_007b: stloc.s System.Int32 (4)
IL_007d: br.s IL_00ba
IL_007f: ldarg.0
IL_0080: ldfld Int32 _charPos
IL_0085: ldarg.0
IL_0086: ldfld Int32 _charLen
IL_008b: bne.un.s IL_0095
IL_008d: ldarg.0
IL_008e: ldc.i4.0
IL_008f: ldc.i4.0
IL_0090: call Void Flush(Boolean, Boolean)
IL_0095: ldarg.0
IL_0096: ldfld Char[] _charBuffer
IL_009b: ldarg.0
IL_009c: ldfld Int32 _charPos
IL_00a1: ldloc.2
IL_00a2: ldloc.s System.Int32 (4)
IL_00a4: ldelem.u2
IL_00a5: stelem.i2
IL_00a6: ldarg.0
IL_00a7: ldarg.0
IL_00a8: ldfld Int32 _charPos
IL_00ad: ldc.i4.1
IL_00ae: add
IL_00af: stfld Int32 _charPos
IL_00b4: ldloc.s System.Int32 (4)
IL_00b6: ldc.i4.1
IL_00b7: add
IL_00b8: stloc.s System.Int32 (4)
IL_00ba: ldloc.s System.Int32 (4)
IL_00bc: ldloc.2
IL_00bd: ldlen
IL_00be: conv.i4
IL_00bf: blt.s IL_007f
IL_00c1: ldarg.0
IL_00c2: ldfld Boolean _autoFlush
IL_00c7: brfalse.s IL_00d1
IL_00c9: ldarg.0
IL_00ca: ldc.i4.1
IL_00cb: ldc.i4.0
IL_00cc: call Void Flush(Boolean, Boolean)
IL_00d1: ret
Void impl_System.IO.StreamWriter_WriteLine(System.IO.StreamWriter, System.String
)
IL_0000: ldarg.1
IL_0001: brtrue IL_000d
IL_0006: ldsfld System.String Empty
IL_000b: starg.s System.String
IL_000d: ldarg.0
IL_000e: call Void stub_call_System.IO.StreamWriter_CheckAsyncTaskInProgress(Sys
tem.IO.StreamWriter)
IL_0013: ldarg.1
IL_0014: call Int32 stub_callvirt_System.String_get_Length(System.String)
IL_0019: stloc.0
IL_001a: ldc.i4.0
IL_001b: stloc.1
IL_001c: br IL_007b
IL_0021: ldarg.0
IL_0022: ldfld Int32 _charPos
IL_0027: ldarg.0
IL_0028: ldfld Int32 _charLen
IL_002d: bne.un IL_003a
IL_0032: ldarg.0
IL_0033: ldc.i4.0
IL_0034: ldc.i4.0
IL_0035: call Void stub_call_System.IO.StreamWriter_Flush(System.IO.StreamWriter
, Boolean, Boolean)
IL_003a: ldarg.0
IL_003b: ldfld Int32 _charLen
IL_0040: ldarg.0
IL_0041: ldfld Int32 _charPos
IL_0046: sub
IL_0047: stloc.3
IL_0048: ldloc.3
IL_0049: ldloc.0
IL_004a: ble IL_0051
IL_004f: ldloc.0
IL_0050: stloc.3
IL_0051: ldarg.1
IL_0052: ldloc.1
IL_0053: ldarg.0
IL_0054: ldfld Char[] _charBuffer
IL_0059: ldarg.0
IL_005a: ldfld Int32 _charPos
IL_005f: ldloc.3
IL_0060: call Void stub_callvirt_System.String_CopyTo(System.String, Int32, Char
[], Int32, Int32)
IL_0065: ldarg.0
IL_0066: ldarg.0
IL_0067: ldfld Int32 _charPos
IL_006c: ldloc.3
IL_006d: add
IL_006e: stfld Int32 _charPos
IL_0073: ldloc.1
IL_0074: ldloc.3
IL_0075: add
IL_0076: stloc.1
IL_0077: ldloc.0
IL_0078: ldloc.3
IL_0079: sub
IL_007a: stloc.0
IL_007b: ldloc.0
IL_007c: ldc.i4.0
IL_007d: bgt IL_0021
IL_0082: ldarg.0
IL_0083: ldfld Char[] CoreNewLine
IL_0088: stloc.2
IL_0089: ldc.i4.0
IL_008a: stloc.s System.Int32 (4)
IL_008c: br IL_00cf
IL_0091: ldarg.0
IL_0092: ldfld Int32 _charPos
IL_0097: ldarg.0
IL_0098: ldfld Int32 _charLen
IL_009d: bne.un IL_00aa
IL_00a2: ldarg.0
IL_00a3: ldc.i4.0
IL_00a4: ldc.i4.0
IL_00a5: call Void stub_call_System.IO.StreamWriter_Flush(System.IO.StreamWriter
, Boolean, Boolean)
IL_00aa: ldarg.0
IL_00ab: ldfld Char[] _charBuffer
IL_00b0: ldarg.0
IL_00b1: ldfld Int32 _charPos
IL_00b6: ldloc.2
IL_00b7: ldloc.s System.Int32 (4)
IL_00b9: ldelem.u2
IL_00ba: stelem.i2
IL_00bb: ldarg.0
IL_00bc: ldarg.0
IL_00bd: ldfld Int32 _charPos
IL_00c2: ldc.i4.1
IL_00c3: add
IL_00c4: stfld Int32 _charPos
IL_00c9: ldloc.s System.Int32 (4)
IL_00cb: ldc.i4.1
IL_00cc: add
IL_00cd: stloc.s System.Int32 (4)
IL_00cf: ldloc.s System.Int32 (4)
IL_00d1: ldloc.2
IL_00d2: ldlen
IL_00d3: conv.i4
IL_00d4: blt IL_0091
IL_00d9: ldarg.0
IL_00da: ldfld Boolean _autoFlush
IL_00df: brfalse IL_00ec
IL_00e4: ldarg.0
IL_00e5: ldc.i4.1
IL_00e6: ldc.i4.0
IL_00e7: call Void stub_call_System.IO.StreamWriter_Flush(System.IO.StreamWriter
, Boolean, Boolean)
IL_00ec: ret
Void CheckAsyncTaskInProgress()
IL_0000: ldarg.0
IL_0001: volatile.
IL_0003: ldfld System.Threading.Tasks.Task _asyncWriteTask
IL_0008: stloc.0
IL_0009: ldloc.0
IL_000a: brfalse.s IL_001f
IL_000c: ldloc.0
IL_000d: callvirt Boolean get_IsCompleted()
Boolean get_IsCompleted()
IL_0012: brtrue.s IL_001f
IL_0014: call System.String get_InvalidOperation_AsyncIOInProgress()