From c27231955aded1676e53c609197627affad6ec9f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 16 Sep 2017 00:43:44 +0200 Subject: [PATCH] Split Async tests --- .../CorrectnessTestRunner.cs | 6 + .../ICSharpCode.Decompiler.Tests.csproj | 3 +- .../PrettyTestRunner.cs | 2 +- .../TestCases/Correctness/Async.cs | 188 ++ .../TestCases/Pretty/Async.cs | 114 +- .../TestCases/Pretty/Async.il | 1607 ++++++++++++++++ .../TestCases/Pretty/Async.opt.il | 1436 +++++++++++++++ .../TestCases/Pretty/Async.opt.roslyn.il | 1348 ++++++++++++++ .../TestCases/Pretty/Async.roslyn.il | 1629 +++++++++++++++++ .../TestCases/Pretty/PropertiesAndEvents.il | 72 +- .../Pretty/PropertiesAndEvents.opt.il | 62 +- .../Pretty/PropertiesAndEvents.opt.roslyn.il | 54 +- .../Pretty/PropertiesAndEvents.roslyn.il | 56 +- 13 files changed, 6340 insertions(+), 237 deletions(-) create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Correctness/Async.cs create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.roslyn.il create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.roslyn.il diff --git a/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs b/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs index 6847b650b..d313764b0 100644 --- a/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs @@ -174,6 +174,12 @@ namespace ICSharpCode.Decompiler.Tests RunCS(options: options); } + [Test, Ignore("Run() method cannot be fully decompiled.")] + public void Async([ValueSource("defaultOptions")] CompilerOptions options) + { + RunCS(options: options); + } + void RunCS([CallerMemberName] string testName = null, CompilerOptions options = CompilerOptions.UseDebug) { string testFileName = testName + ".cs"; diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index b6e8c6ac7..96f858763 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -58,13 +58,14 @@ + - + diff --git a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs index d0405e651..bbe37a2bf 100644 --- a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs @@ -103,7 +103,7 @@ namespace ICSharpCode.Decompiler.Tests Run(cscOptions: cscOptions); } - [Test, Ignore("Not implemented")] + [Test] public void Async([ValueSource("defaultOptions")] CompilerOptions cscOptions) { Run(cscOptions: cscOptions); diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Correctness/Async.cs b/ICSharpCode.Decompiler.Tests/TestCases/Correctness/Async.cs new file mode 100644 index 000000000..2d35dab5f --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Correctness/Async.cs @@ -0,0 +1,188 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#pragma warning disable 1998 +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; + +namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness +{ + public class Async + { + public static void Main() + { + new Async().Run(); + } + + public async void Run() + { + await SimpleBoolTaskMethod(); + StreamCopyTo(new MemoryStream(new byte[1024]), 16); + StreamCopyToWithConfigureAwait(new MemoryStream(new byte[1024]), 16); + await AwaitInForEach(Enumerable.Range(0, 100).Select(i => Task.FromResult(i))); + await TaskMethodWithoutAwaitButWithExceptionHandling(); +#if !LEGACY_CSC + await AwaitCatch(Task.FromResult(1)); + await AwaitFinally(Task.FromResult(2)); +#endif + await NestedAwait(Task.FromResult(Task.FromResult(5))); + await AwaitWithStack(Task.FromResult(3)); + await AwaitWithStack2(Task.FromResult(4)); +#if !LEGACY_CSC + await AwaitInCatch(Task.FromResult(1), Task.FromResult(2)); + await AwaitInFinally(Task.FromResult(2), Task.FromResult(4)); +#endif + } + + public async Task SimpleBoolTaskMethod() + { + Console.WriteLine("Before"); + await Task.Delay(TimeSpan.FromSeconds(1.0)); + Console.WriteLine("After"); + return true; + } + + public async void StreamCopyTo(Stream destination, int bufferSize) + { + Console.WriteLine("Before"); + byte[] array = new byte[bufferSize]; + int count; + Console.WriteLine("BeforeLoop"); + while ((count = await destination.ReadAsync(array, 0, array.Length)) != 0) { + Console.WriteLine("In Loop after condition!"); + await destination.WriteAsync(array, 0, count); + Console.WriteLine("In Loop after inner await"); + } + Console.WriteLine("After"); + } + + public async void StreamCopyToWithConfigureAwait(Stream destination, int bufferSize) + { + Console.WriteLine("Before"); + byte[] array = new byte[bufferSize]; + int count; + Console.WriteLine("Before Loop"); + while ((count = await destination.ReadAsync(array, 0, array.Length).ConfigureAwait(false)) != 0) { + Console.WriteLine("Before Inner Await"); + await destination.WriteAsync(array, 0, count).ConfigureAwait(false); + Console.WriteLine("After Inner Await"); + } + Console.WriteLine("After"); + } + + public async Task AwaitInForEach(IEnumerable> elements) + { + int num = 0; + Console.WriteLine("Before Loop"); + foreach (Task current in elements) { + Console.WriteLine("Before Inner Await"); + num += await current; + Console.WriteLine("After Inner Await"); + } + Console.WriteLine("After"); + return num; + } + + public async Task TaskMethodWithoutAwaitButWithExceptionHandling() + { + try { + using (new StringWriter()) { + Console.WriteLine("No Await"); + } + } catch (Exception) { + Console.WriteLine("Crash"); + } + } + +#if !LEGACY_CSC + public async Task AwaitCatch(Task task) + { + try { + Console.WriteLine("Before throw"); + throw new Exception(); + } catch { + Console.WriteLine(await task); + } + } + + public async Task AwaitFinally(Task task) + { + try { + Console.WriteLine("Before throw"); + throw new Exception(); + } finally { + Console.WriteLine(await task); + } + } +#endif + + public async Task NestedAwait(Task> task) + { + return await (await task); + } + + public async Task AwaitWithStack(Task task) + { + Console.WriteLine("A", 1, await task); + } + + public async Task AwaitWithStack2(Task task) + { + if (await this.SimpleBoolTaskMethod()) { + Console.WriteLine("A", 1, await task); + } else { + int num = 1; + Console.WriteLine("A", 1, num); + } + } + +#if !LEGACY_CSC + public async Task AwaitInCatch(Task task1, Task task2) + { + try { + Console.WriteLine("Start try"); + await task1; + Console.WriteLine("End try"); + } catch (Exception) { + Console.WriteLine("Start catch"); + await task2; + Console.WriteLine("End catch"); + } + Console.WriteLine("End Method"); + } + + public async Task AwaitInFinally(Task task1, Task task2) + { + try { + Console.WriteLine("Start try"); + await task1; + Console.WriteLine("End try"); + } finally { + Console.WriteLine("Start finally"); + await task2; + Console.WriteLine("End finally"); + } + Console.WriteLine("End Method"); + } +#endif + } +} \ No newline at end of file diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.cs index 0150e7266..5ee72d908 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.cs @@ -18,8 +18,6 @@ #pragma warning disable 1998 using System; -using System.Collections.Generic; -using System.IO; using System.Runtime.CompilerServices; using System.Threading.Tasks; @@ -82,121 +80,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty Console.WriteLine("After"); } - public async void StreamCopyTo(Stream destination, int bufferSize) - { - byte[] array = new byte[bufferSize]; - int count; - while ((count = await destination.ReadAsync(array, 0, array.Length)) != 0) { - await destination.WriteAsync(array, 0, count); - } - } - - public async void StreamCopyToWithConfigureAwait(Stream destination, int bufferSize) - { - byte[] array = new byte[bufferSize]; - int count; - while ((count = await destination.ReadAsync(array, 0, array.Length).ConfigureAwait(false)) != 0) { - await destination.WriteAsync(array, 0, count).ConfigureAwait(false); - } - } - public async void AwaitInLoopCondition() { while (await this.SimpleBoolTaskMethod()) { Console.WriteLine("Body"); } } - - public async Task AwaitInForEach(IEnumerable> elements) - { - int num = 0; - foreach (Task current in elements) { - num += await current; - } - return num; - } - - public async Task TaskMethodWithoutAwaitButWithExceptionHandling() - { - try { - using (new StringWriter()) { - Console.WriteLine("No Await"); - } - } catch (Exception) { - Console.WriteLine("Crash"); - } - } - -#if !LEGACY_CSC - public async Task AwaitCatch(Task task) - { - try { - Console.WriteLine("Before throw"); - throw new Exception(); - } catch { - Console.WriteLine(await task); - } - } - - public async Task AwaitFinally(Task task) - { - try { - Console.WriteLine("Before throw"); - throw new Exception(); - } finally { - Console.WriteLine(await task); - } - } -#endif - - public async Task NestedAwait(Task> task) - { - return await (await task); - } - - public async Task AwaitWithStack(Task task) - { - Console.WriteLine("A", 1, await task); - } - - public async Task AwaitWithStack2(Task task) - { - if (await this.SimpleBoolTaskMethod()) { - Console.WriteLine("A", 1, await task); - } else { - int num = 1; - Console.WriteLine("A", 1, num); - } - } - -#if !LEGACY_CSC - public async Task AwaitInCatch(Task task1, Task task2) - { - try { - Console.WriteLine("Start try"); - await task1; - Console.WriteLine("End try"); - } catch (Exception) { - Console.WriteLine("Start catch"); - await task2; - Console.WriteLine("End catch"); - } - Console.WriteLine("End Method"); - } - - public async Task AwaitInFinally(Task task1, Task task2) - { - try { - Console.WriteLine("Start try"); - await task1; - Console.WriteLine("End try"); - } finally { - Console.WriteLine("Start finally"); - await task2; - Console.WriteLine("End finally"); - } - Console.WriteLine("End Method"); - } -#endif } -} \ No newline at end of file +} diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il new file mode 100644 index 000000000..71b0622ba --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il @@ -0,0 +1,1607 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly '0bl3wgec' +{ + .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 + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module '0bl3wgec.dll' +// MVID: {D5634CE0-620A-4F18-AC07-9132CB05EFF7} +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00930000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested private beforefieldinit 'd__0' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter1' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 204 (0xcc) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_4) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_000f + + IL_000d: br.s IL_0011 + + IL_000f: br.s IL_0062 + + IL_0011: br.s IL_0013 + + IL_0013: nop + IL_0014: ldstr "Before" + IL_0019: call void [mscorlib]System.Console::WriteLine(string) + IL_001e: nop + IL_001f: ldc.r8 1. + IL_0028: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_002d: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0032: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_0037: stloc.3 + IL_0038: ldloca.s V_3 + IL_003a: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_003f: brtrue.s IL_0080 + + IL_0041: ldarg.0 + IL_0042: ldc.i4.0 + IL_0043: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0048: ldarg.0 + IL_0049: ldloc.3 + IL_004a: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__$awaiter1' + IL_004f: ldarg.0 + IL_0050: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0055: ldloca.s V_3 + IL_0057: ldarg.0 + IL_0058: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__0'>(!!0&, + !!1&) + IL_005d: nop + IL_005e: ldc.i4.0 + IL_005f: stloc.0 + IL_0060: leave.s IL_00ca + + IL_0062: ldarg.0 + IL_0063: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__$awaiter1' + IL_0068: stloc.3 + IL_0069: ldarg.0 + IL_006a: ldloca.s V_4 + IL_006c: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0072: ldloc.s V_4 + IL_0074: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__$awaiter1' + IL_0079: ldarg.0 + IL_007a: ldc.i4.m1 + IL_007b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0080: ldloca.s V_3 + IL_0082: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0087: nop + IL_0088: ldloca.s V_3 + IL_008a: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0090: ldstr "After" + IL_0095: call void [mscorlib]System.Console::WriteLine(string) + IL_009a: nop + IL_009b: leave.s IL_00b5 + + } // end .try + catch [mscorlib]System.Exception + { + IL_009d: stloc.1 + IL_009e: ldarg.0 + IL_009f: ldc.i4.s -2 + IL_00a1: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_00a6: ldarg.0 + IL_00a7: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00ac: ldloc.1 + IL_00ad: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00b2: nop + IL_00b3: leave.s IL_00ca + + } // end handler + IL_00b5: nop + IL_00b6: ldarg.0 + IL_00b7: ldc.i4.s -2 + IL_00b9: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_00be: ldarg.0 + IL_00bf: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00c4: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00c9: nop + IL_00ca: nop + IL_00cb: ret + } // end of method 'd__0'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__0'::SetStateMachine + + } // end of class 'd__0' + + .class auto ansi sealed nested private beforefieldinit '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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 67 (0x43) + .maxstack 2 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_0004 + + IL_0004: br.s IL_0006 + + IL_0006: nop + IL_0007: ldstr "No Await" + IL_000c: call void [mscorlib]System.Console::WriteLine(string) + IL_0011: nop + IL_0012: leave.s IL_002c + + } // end .try + catch [mscorlib]System.Exception + { + IL_0014: stloc.1 + IL_0015: ldarg.0 + IL_0016: ldc.i4.s -2 + IL_0018: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_001d: ldarg.0 + IL_001e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0023: ldloc.1 + IL_0024: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0029: nop + IL_002a: leave.s IL_0041 + + } // end handler + IL_002c: nop + IL_002d: ldarg.0 + IL_002e: ldc.i4.s -2 + IL_0030: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0035: ldarg.0 + IL_0036: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_003b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0040: nop + IL_0041: nop + IL_0042: ret + } // end of method 'd__3'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__3'::SetStateMachine + + } // end of class 'd__3' + + .class auto ansi sealed nested private beforefieldinit 'd__5' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 56 (0x38) + .maxstack 2 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_0004 + + IL_0004: br.s IL_0006 + + IL_0006: nop + IL_0007: leave.s IL_0021 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0009: stloc.1 + IL_000a: ldarg.0 + IL_000b: ldc.i4.s -2 + IL_000d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0012: ldarg.0 + IL_0013: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0018: ldloc.1 + IL_0019: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_001e: nop + IL_001f: leave.s IL_0036 + + } // end handler + IL_0021: nop + IL_0022: ldarg.0 + IL_0023: ldc.i4.s -2 + IL_0025: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_002a: ldarg.0 + IL_002b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0030: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0035: nop + IL_0036: nop + IL_0037: ret + } // end of method 'd__5'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__5'::SetStateMachine + + } // end of class 'd__5' + + .class auto ansi sealed nested private beforefieldinit 'd__7' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__$awaiter8' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 174 (0xae) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_5) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_000f + + IL_000d: br.s IL_0011 + + IL_000f: br.s IL_004e + + IL_0011: br.s IL_0013 + + IL_0013: nop + IL_0014: call valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable [mscorlib]System.Threading.Tasks.Task::Yield() + IL_0019: stloc.3 + IL_001a: ldloca.s V_3 + IL_001c: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_0021: stloc.s V_4 + IL_0023: ldloca.s V_4 + IL_0025: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_002a: brtrue.s IL_006d + + IL_002c: ldarg.0 + IL_002d: ldc.i4.0 + IL_002e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0033: ldarg.0 + IL_0034: ldloc.s V_4 + IL_0036: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__$awaiter8' + IL_003b: ldarg.0 + IL_003c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0041: ldloca.s V_4 + IL_0043: ldarg.0 + IL_0044: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__7'>(!!0&, + !!1&) + IL_0049: nop + IL_004a: ldc.i4.0 + IL_004b: stloc.0 + IL_004c: leave.s IL_00ac + + IL_004e: ldarg.0 + IL_004f: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__$awaiter8' + IL_0054: stloc.s V_4 + IL_0056: ldarg.0 + IL_0057: ldloca.s V_5 + IL_0059: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_005f: ldloc.s V_5 + IL_0061: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__$awaiter8' + IL_0066: ldarg.0 + IL_0067: ldc.i4.m1 + IL_0068: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_006d: ldloca.s V_4 + IL_006f: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_0074: nop + IL_0075: ldloca.s V_4 + IL_0077: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_007d: leave.s IL_0097 + + } // end .try + catch [mscorlib]System.Exception + { + IL_007f: stloc.1 + IL_0080: ldarg.0 + IL_0081: ldc.i4.s -2 + IL_0083: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0088: ldarg.0 + IL_0089: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_008e: ldloc.1 + IL_008f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0094: nop + IL_0095: leave.s IL_00ac + + } // end handler + IL_0097: nop + IL_0098: ldarg.0 + IL_0099: ldc.i4.s -2 + IL_009b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_00a0: ldarg.0 + IL_00a1: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_00a6: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00ab: nop + IL_00ac: nop + IL_00ad: ret + } // end of method 'd__7'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__7'::SetStateMachine + + } // end of class 'd__7' + + .class auto ansi sealed nested private beforefieldinit 'd__a' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__$awaiterb' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 178 (0xb2) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_5) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_000f + + IL_000d: br.s IL_0011 + + IL_000f: br.s IL_0052 + + IL_0011: br.s IL_0013 + + IL_0013: nop + IL_0014: ldloca.s V_3 + IL_0016: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable + IL_001c: ldloc.3 + IL_001d: stloc.3 + IL_001e: ldloca.s V_3 + IL_0020: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_0025: stloc.s V_4 + IL_0027: ldloca.s V_4 + IL_0029: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_002e: brtrue.s IL_0071 + + IL_0030: ldarg.0 + IL_0031: ldc.i4.0 + IL_0032: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_0037: ldarg.0 + IL_0038: ldloc.s V_4 + IL_003a: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>u__$awaiterb' + IL_003f: ldarg.0 + IL_0040: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0045: ldloca.s V_4 + IL_0047: ldarg.0 + IL_0048: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__a'>(!!0&, + !!1&) + IL_004d: nop + IL_004e: ldc.i4.0 + IL_004f: stloc.0 + IL_0050: leave.s IL_00b0 + + IL_0052: ldarg.0 + IL_0053: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>u__$awaiterb' + IL_0058: stloc.s V_4 + IL_005a: ldarg.0 + IL_005b: ldloca.s V_5 + IL_005d: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0063: ldloc.s V_5 + IL_0065: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>u__$awaiterb' + IL_006a: ldarg.0 + IL_006b: ldc.i4.m1 + IL_006c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_0071: ldloca.s V_4 + IL_0073: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_0078: nop + IL_0079: ldloca.s V_4 + IL_007b: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0081: leave.s IL_009b + + } // end .try + catch [mscorlib]System.Exception + { + IL_0083: stloc.1 + IL_0084: ldarg.0 + IL_0085: ldc.i4.s -2 + IL_0087: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_008c: ldarg.0 + IL_008d: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0092: ldloc.1 + IL_0093: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0098: nop + IL_0099: leave.s IL_00b0 + + } // end handler + IL_009b: nop + IL_009c: ldarg.0 + IL_009d: ldc.i4.s -2 + IL_009f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_00a4: ldarg.0 + IL_00a5: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_00aa: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00af: nop + IL_00b0: nop + IL_00b1: ret + } // end of method 'd__a'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__a'::SetStateMachine + + } // end of class 'd__a' + + .class auto ansi sealed nested private beforefieldinit 'd__d' + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaitere' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 204 (0xcc) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_4) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_000f + + IL_000d: br.s IL_0011 + + IL_000f: br.s IL_0062 + + IL_0011: br.s IL_0013 + + IL_0013: nop + IL_0014: ldstr "Before" + IL_0019: call void [mscorlib]System.Console::WriteLine(string) + IL_001e: nop + IL_001f: ldc.r8 1. + IL_0028: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_002d: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0032: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_0037: stloc.3 + IL_0038: ldloca.s V_3 + IL_003a: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_003f: brtrue.s IL_0080 + + IL_0041: ldarg.0 + IL_0042: ldc.i4.0 + IL_0043: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_0048: ldarg.0 + IL_0049: ldloc.3 + IL_004a: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>u__$awaitere' + IL_004f: ldarg.0 + IL_0050: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0055: ldloca.s V_3 + IL_0057: ldarg.0 + IL_0058: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::AwaitUnsafeOnCompletedd__d'>(!!0&, + !!1&) + IL_005d: nop + IL_005e: ldc.i4.0 + IL_005f: stloc.0 + IL_0060: leave.s IL_00ca + + IL_0062: ldarg.0 + IL_0063: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>u__$awaitere' + IL_0068: stloc.3 + IL_0069: ldarg.0 + IL_006a: ldloca.s V_4 + IL_006c: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0072: ldloc.s V_4 + IL_0074: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>u__$awaitere' + IL_0079: ldarg.0 + IL_007a: ldc.i4.m1 + IL_007b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_0080: ldloca.s V_3 + IL_0082: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0087: nop + IL_0088: ldloca.s V_3 + IL_008a: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0090: ldstr "After" + IL_0095: call void [mscorlib]System.Console::WriteLine(string) + IL_009a: nop + IL_009b: leave.s IL_00b5 + + } // end .try + catch [mscorlib]System.Exception + { + IL_009d: stloc.1 + IL_009e: ldarg.0 + IL_009f: ldc.i4.s -2 + IL_00a1: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_00a6: ldarg.0 + IL_00a7: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_00ac: ldloc.1 + IL_00ad: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00b2: nop + IL_00b3: leave.s IL_00ca + + } // end handler + IL_00b5: nop + IL_00b6: ldarg.0 + IL_00b7: ldc.i4.s -2 + IL_00b9: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_00be: ldarg.0 + IL_00bf: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_00c4: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_00c9: nop + IL_00ca: nop + IL_00cb: ret + } // end of method 'd__d'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__d'::SetStateMachine + + } // end of class 'd__d' + + .class auto ansi sealed nested private beforefieldinit 'd__10' + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 67 (0x43) + .maxstack 2 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_0004 + + IL_0004: br.s IL_0006 + + IL_0006: nop + IL_0007: ldstr "No Await" + IL_000c: call void [mscorlib]System.Console::WriteLine(string) + IL_0011: nop + IL_0012: leave.s IL_002c + + } // end .try + catch [mscorlib]System.Exception + { + IL_0014: stloc.1 + IL_0015: ldarg.0 + IL_0016: ldc.i4.s -2 + IL_0018: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>1__state' + IL_001d: ldarg.0 + IL_001e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0023: ldloc.1 + IL_0024: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0029: nop + IL_002a: leave.s IL_0041 + + } // end handler + IL_002c: nop + IL_002d: ldarg.0 + IL_002e: ldc.i4.s -2 + IL_0030: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>1__state' + IL_0035: ldarg.0 + IL_0036: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_003b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_0040: nop + IL_0041: nop + IL_0042: ret + } // end of method 'd__10'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__10'::SetStateMachine + + } // end of class 'd__10' + + .class auto ansi sealed nested private beforefieldinit 'd__12' + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter13' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 210 (0xd2) + .maxstack 3 + .locals init (bool V_0, + bool V_1, + class [mscorlib]System.Exception V_2, + int32 V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_5) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_0008: stloc.3 + IL_0009: ldloc.3 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_000f + + IL_000d: br.s IL_0011 + + IL_000f: br.s IL_0064 + + IL_0011: br.s IL_0013 + + IL_0013: nop + IL_0014: ldstr "Before" + IL_0019: call void [mscorlib]System.Console::WriteLine(string) + IL_001e: nop + IL_001f: ldc.r8 1. + IL_0028: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_002d: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0032: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_0037: stloc.s V_4 + IL_0039: ldloca.s V_4 + IL_003b: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0040: brtrue.s IL_0083 + + IL_0042: ldarg.0 + IL_0043: ldc.i4.0 + IL_0044: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_0049: ldarg.0 + IL_004a: ldloc.s V_4 + IL_004c: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>u__$awaiter13' + IL_0051: ldarg.0 + IL_0052: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0057: ldloca.s V_4 + IL_0059: ldarg.0 + IL_005a: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompletedd__12'>(!!0&, + !!1&) + IL_005f: nop + IL_0060: ldc.i4.0 + IL_0061: stloc.0 + IL_0062: leave.s IL_00d0 + + IL_0064: ldarg.0 + IL_0065: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>u__$awaiter13' + IL_006a: stloc.s V_4 + IL_006c: ldarg.0 + IL_006d: ldloca.s V_5 + IL_006f: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0075: ldloc.s V_5 + IL_0077: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>u__$awaiter13' + IL_007c: ldarg.0 + IL_007d: ldc.i4.m1 + IL_007e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_0083: ldloca.s V_4 + IL_0085: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_008a: nop + IL_008b: ldloca.s V_4 + IL_008d: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0093: ldstr "After" + IL_0098: call void [mscorlib]System.Console::WriteLine(string) + IL_009d: nop + IL_009e: ldc.i4.1 + IL_009f: stloc.1 + IL_00a0: leave.s IL_00ba + + } // end .try + catch [mscorlib]System.Exception + { + IL_00a2: stloc.2 + IL_00a3: ldarg.0 + IL_00a4: ldc.i4.s -2 + IL_00a6: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_00ab: ldarg.0 + IL_00ac: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_00b1: ldloc.2 + IL_00b2: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [mscorlib]System.Exception) + IL_00b7: nop + IL_00b8: leave.s IL_00d0 + + } // end handler + IL_00ba: nop + IL_00bb: ldarg.0 + IL_00bc: ldc.i4.s -2 + IL_00be: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_00c3: ldarg.0 + IL_00c4: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_00c9: ldloc.1 + IL_00ca: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_00cf: nop + IL_00d0: nop + IL_00d1: ret + } // end of method 'd__12'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__12'::SetStateMachine + + } // end of class 'd__12' + + .class auto ansi sealed nested private beforefieldinit 'd__15' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__$awaiter16' + .field private object '<>t__stack' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter17' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 340 (0x154) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_4, + bool V_5, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_6, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_7) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: switch ( + IL_0019, + IL_001b) + IL_0017: br.s IL_0020 + + IL_0019: br.s IL_006c + + IL_001b: br IL_00e8 + + IL_0020: br.s IL_0022 + + IL_0022: nop + IL_0023: ldstr "Before" + IL_0028: call void [mscorlib]System.Console::WriteLine(string) + IL_002d: nop + IL_002e: ldarg.0 + IL_002f: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>4__this' + IL_0034: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_0039: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_003e: stloc.3 + IL_003f: ldloca.s V_3 + IL_0041: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0046: brtrue.s IL_008a + + IL_0048: ldarg.0 + IL_0049: ldc.i4.0 + IL_004a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_004f: ldarg.0 + IL_0050: ldloc.3 + IL_0051: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter16' + IL_0056: ldarg.0 + IL_0057: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_005c: ldloca.s V_3 + IL_005e: ldarg.0 + IL_005f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'>(!!0&, + !!1&) + IL_0064: nop + IL_0065: ldc.i4.0 + IL_0066: stloc.0 + IL_0067: leave IL_0152 + + IL_006c: ldarg.0 + IL_006d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter16' + IL_0072: stloc.3 + IL_0073: ldarg.0 + IL_0074: ldloca.s V_4 + IL_0076: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_007c: ldloc.s V_4 + IL_007e: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter16' + IL_0083: ldarg.0 + IL_0084: ldc.i4.m1 + IL_0085: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_008a: ldloca.s V_3 + IL_008c: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_0091: ldloca.s V_3 + IL_0093: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0099: ldc.i4.0 + IL_009a: ceq + IL_009c: stloc.s V_5 + IL_009e: ldloc.s V_5 + IL_00a0: brtrue.s IL_0118 + + IL_00a2: nop + IL_00a3: ldc.r8 1. + IL_00ac: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_00b1: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_00b6: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_00bb: stloc.s V_6 + IL_00bd: ldloca.s V_6 + IL_00bf: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_00c4: brtrue.s IL_0107 + + IL_00c6: ldarg.0 + IL_00c7: ldc.i4.1 + IL_00c8: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_00cd: ldarg.0 + IL_00ce: ldloc.s V_6 + IL_00d0: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter17' + IL_00d5: ldarg.0 + IL_00d6: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_00db: ldloca.s V_6 + IL_00dd: ldarg.0 + IL_00de: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__15'>(!!0&, + !!1&) + IL_00e3: nop + IL_00e4: ldc.i4.0 + IL_00e5: stloc.0 + IL_00e6: leave.s IL_0152 + + IL_00e8: ldarg.0 + IL_00e9: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter17' + IL_00ee: stloc.s V_6 + IL_00f0: ldarg.0 + IL_00f1: ldloca.s V_7 + IL_00f3: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_00f9: ldloc.s V_7 + IL_00fb: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter17' + IL_0100: ldarg.0 + IL_0101: ldc.i4.m1 + IL_0102: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_0107: ldloca.s V_6 + IL_0109: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_010e: nop + IL_010f: ldloca.s V_6 + IL_0111: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0117: nop + IL_0118: ldstr "After" + IL_011d: call void [mscorlib]System.Console::WriteLine(string) + IL_0122: nop + IL_0123: leave.s IL_013d + + } // end .try + catch [mscorlib]System.Exception + { + IL_0125: stloc.1 + IL_0126: ldarg.0 + IL_0127: ldc.i4.s -2 + IL_0129: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_012e: ldarg.0 + IL_012f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0134: ldloc.1 + IL_0135: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_013a: nop + IL_013b: leave.s IL_0152 + + } // end handler + IL_013d: nop + IL_013e: ldarg.0 + IL_013f: ldc.i4.s -2 + IL_0141: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_0146: ldarg.0 + IL_0147: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_014c: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0151: nop + IL_0152: nop + IL_0153: ret + } // end of method 'd__15'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__15'::SetStateMachine + + } // end of class 'd__15' + + .class auto ansi sealed nested private beforefieldinit 'd__19' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__$awaiter1a' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 194 (0xc2) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_4, + bool V_5) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_000f + + IL_000d: br.s IL_0011 + + IL_000f: br.s IL_005e + + IL_0011: br.s IL_0013 + + IL_0013: nop + IL_0014: br.s IL_0023 + + IL_0016: nop + IL_0017: ldstr "Body" + IL_001c: call void [mscorlib]System.Console::WriteLine(string) + IL_0021: nop + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>4__this' + IL_0029: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_002e: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_0033: stloc.3 + IL_0034: ldloca.s V_3 + IL_0036: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_003b: brtrue.s IL_007c + + IL_003d: ldarg.0 + IL_003e: ldc.i4.0 + IL_003f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_0044: ldarg.0 + IL_0045: ldloc.3 + IL_0046: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>u__$awaiter1a' + IL_004b: ldarg.0 + IL_004c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0051: ldloca.s V_3 + IL_0053: ldarg.0 + IL_0054: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'>(!!0&, + !!1&) + IL_0059: nop + IL_005a: ldc.i4.0 + IL_005b: stloc.0 + IL_005c: leave.s IL_00c0 + + IL_005e: ldarg.0 + IL_005f: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>u__$awaiter1a' + IL_0064: stloc.3 + IL_0065: ldarg.0 + IL_0066: ldloca.s V_4 + IL_0068: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_006e: ldloc.s V_4 + IL_0070: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>u__$awaiter1a' + IL_0075: ldarg.0 + IL_0076: ldc.i4.m1 + IL_0077: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_007c: ldloca.s V_3 + IL_007e: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_0083: ldloca.s V_3 + IL_0085: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_008b: stloc.s V_5 + IL_008d: ldloc.s V_5 + IL_008f: brtrue.s IL_0016 + + IL_0091: leave.s IL_00ab + + } // end .try + catch [mscorlib]System.Exception + { + IL_0093: stloc.1 + IL_0094: ldarg.0 + IL_0095: ldc.i4.s -2 + IL_0097: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_009c: ldarg.0 + IL_009d: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_00a2: ldloc.1 + IL_00a3: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00a8: nop + IL_00a9: leave.s IL_00c0 + + } // end handler + IL_00ab: nop + IL_00ac: ldarg.0 + IL_00ad: ldc.i4.s -2 + IL_00af: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_00b4: ldarg.0 + IL_00b5: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_00ba: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00bf: nop + IL_00c0: nop + IL_00c1: ret + } // end of method 'd__19'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__19'::SetStateMachine + + } // end of class 'd__19' + + .method public hidebysig instance void + SimpleVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4A 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..JICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__0.. + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__0'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::SimpleVoidMethod + + .method public hidebysig instance void + VoidMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 50 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..PICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 56 6F 69 64 4D 65 74 68 // .Async+d + 5F 5F 33 00 00 ) // __3.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__3'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::VoidMethodWithoutAwait + + .method public hidebysig instance void + EmptyVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 49 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..IICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 45 6D 70 74 79 56 6F 69 // .Async+d__5.. + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__5'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::EmptyVoidMethod + + .method public hidebysig instance void + AwaitYield() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 44 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..DICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 59 69 65 // .Async+d__7.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__7'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::AwaitYield + + .method public hidebysig instance void + AwaitDefaultYieldAwaitable() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 54 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..TICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 44 65 66 // .Async+d__a.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__a'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::AwaitDefaultYieldAwaitable + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + SimpleVoidTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__ + 64 00 00 ) // d.. + // Code size 62 (0x3e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d' V_0, + class [mscorlib]System.Threading.Tasks.Task V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_2) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0023: stloc.2 + IL_0024: ldloca.s V_2 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__d'>(!!0&) + IL_002d: ldloca.s V_0 + IL_002f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0034: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_0039: stloc.1 + IL_003a: br.s IL_003c + + IL_003c: ldloc.1 + IL_003d: ret + } // end of method Async::SimpleVoidTaskMethod + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + TaskMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 51 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..QICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 61 73 6B 4D 65 74 68 // .Async+d + 5F 5F 31 30 00 00 ) // __10.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 62 (0x3e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10' V_0, + class [mscorlib]System.Threading.Tasks.Task V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_2) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0023: stloc.2 + IL_0024: ldloca.s V_2 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__10'>(!!0&) + IL_002d: ldloca.s V_0 + IL_002f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0034: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_0039: stloc.1 + IL_003a: br.s IL_003c + + IL_003c: ldloc.1 + IL_003d: ret + } // end of method Async::TaskMethodWithoutAwait + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1 + SimpleBoolTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4F 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..OICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 42 6F // .Async+d__ + 31 32 00 00 ) // 12.. + // Code size 62 (0x3e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12' V_0, + class [mscorlib]System.Threading.Tasks.Task`1 V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 V_2) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0023: stloc.2 + IL_0024: ldloca.s V_2 + IL_0026: ldloca.s V_0 + IL_0028: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Startd__12'>(!!0&) + IL_002d: ldloca.s V_0 + IL_002f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0034: call instance class [mscorlib]System.Threading.Tasks.Task`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() + IL_0039: stloc.1 + IL_003a: br.s IL_003c + + IL_003c: ldloc.1 + IL_003d: ret + } // end of method Async::SimpleBoolTaskMethod + + .method public hidebysig instance void + TwoAwaitsWithDifferentAwaiterTypes() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5D 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..]ICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 77 6F 41 77 61 69 74 // .Async+d__15 + 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__15'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::TwoAwaitsWithDifferentAwaiterTypes + + .method public hidebysig instance void + AwaitInLoopCondition() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4F 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..OICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 49 6E 4C // .Async+d__ + 31 39 00 00 ) // 19.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__19'>(!!0&) + IL_002d: br.s IL_002f + + IL_002f: ret + } // end of method Async::AwaitInLoopCondition + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method Async::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Async.res diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il new file mode 100644 index 000000000..5fbbe7e85 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il @@ -0,0 +1,1436 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly '5wwmyl42' +{ + .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 + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module '5wwmyl42.dll' +// MVID: {91D59E53-2AA6-427F-B57D-0FC8808BA12D} +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00A20000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested private beforefieldinit 'd__0' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter1' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 189 (0xbd) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_4) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_0059 + + IL_000d: ldstr "Before" + IL_0012: call void [mscorlib]System.Console::WriteLine(string) + IL_0017: ldc.r8 1. + IL_0020: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0025: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_002a: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_002f: stloc.3 + IL_0030: ldloca.s V_3 + IL_0032: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0037: brtrue.s IL_0077 + + IL_0039: ldarg.0 + IL_003a: ldc.i4.0 + IL_003b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0040: ldarg.0 + IL_0041: ldloc.3 + IL_0042: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__$awaiter1' + IL_0047: ldarg.0 + IL_0048: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_004d: ldloca.s V_3 + IL_004f: ldarg.0 + IL_0050: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__0'>(!!0&, + !!1&) + IL_0055: ldc.i4.0 + IL_0056: stloc.0 + IL_0057: leave.s IL_00bc + + IL_0059: ldarg.0 + IL_005a: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__$awaiter1' + IL_005f: stloc.3 + IL_0060: ldarg.0 + IL_0061: ldloca.s V_4 + IL_0063: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0069: ldloc.s V_4 + IL_006b: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__$awaiter1' + IL_0070: ldarg.0 + IL_0071: ldc.i4.m1 + IL_0072: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0077: ldloca.s V_3 + IL_0079: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_007e: ldloca.s V_3 + IL_0080: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0086: ldstr "After" + IL_008b: call void [mscorlib]System.Console::WriteLine(string) + IL_0090: leave.s IL_00a9 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0092: stloc.1 + IL_0093: ldarg.0 + IL_0094: ldc.i4.s -2 + IL_0096: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_009b: ldarg.0 + IL_009c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00a1: ldloc.1 + IL_00a2: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00a7: leave.s IL_00bc + + } // end handler + IL_00a9: ldarg.0 + IL_00aa: ldc.i4.s -2 + IL_00ac: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_00b1: ldarg.0 + IL_00b2: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00b7: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00bc: ret + } // end of method 'd__0'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__0'::SetStateMachine + + } // end of class 'd__0' + + .class auto ansi sealed nested private beforefieldinit '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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 57 (0x39) + .maxstack 2 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldstr "No Await" + IL_0007: call void [mscorlib]System.Console::WriteLine(string) + IL_000c: leave.s IL_0025 + + } // end .try + catch [mscorlib]System.Exception + { + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldc.i4.s -2 + IL_0012: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0017: ldarg.0 + IL_0018: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_001d: ldloc.1 + IL_001e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0023: leave.s IL_0038 + + } // end handler + IL_0025: ldarg.0 + IL_0026: ldc.i4.s -2 + IL_0028: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_002d: ldarg.0 + IL_002e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0033: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0038: ret + } // end of method 'd__3'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__3'::SetStateMachine + + } // end of class 'd__3' + + .class auto ansi sealed nested private beforefieldinit 'd__5' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 47 (0x2f) + .maxstack 2 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: leave.s IL_001b + + } // end .try + catch [mscorlib]System.Exception + { + IL_0004: stloc.1 + IL_0005: ldarg.0 + IL_0006: ldc.i4.s -2 + IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_000d: ldarg.0 + IL_000e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0013: ldloc.1 + IL_0014: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0019: leave.s IL_002e + + } // end handler + IL_001b: ldarg.0 + IL_001c: ldc.i4.s -2 + IL_001e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0023: ldarg.0 + IL_0024: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0029: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_002e: ret + } // end of method 'd__5'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__5'::SetStateMachine + + } // end of class 'd__5' + + .class auto ansi sealed nested private beforefieldinit 'd__7' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__$awaiter8' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 161 (0xa1) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_5) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_0046 + + IL_000d: call valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable [mscorlib]System.Threading.Tasks.Task::Yield() + IL_0012: stloc.3 + IL_0013: ldloca.s V_3 + IL_0015: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_001a: stloc.s V_4 + IL_001c: ldloca.s V_4 + IL_001e: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_0023: brtrue.s IL_0065 + + IL_0025: ldarg.0 + IL_0026: ldc.i4.0 + IL_0027: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_002c: ldarg.0 + IL_002d: ldloc.s V_4 + IL_002f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__$awaiter8' + IL_0034: ldarg.0 + IL_0035: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_003a: ldloca.s V_4 + IL_003c: ldarg.0 + IL_003d: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__7'>(!!0&, + !!1&) + IL_0042: ldc.i4.0 + IL_0043: stloc.0 + IL_0044: leave.s IL_00a0 + + IL_0046: ldarg.0 + IL_0047: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__$awaiter8' + IL_004c: stloc.s V_4 + IL_004e: ldarg.0 + IL_004f: ldloca.s V_5 + IL_0051: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0057: ldloc.s V_5 + IL_0059: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__$awaiter8' + IL_005e: ldarg.0 + IL_005f: ldc.i4.m1 + IL_0060: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0065: ldloca.s V_4 + IL_0067: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_006c: ldloca.s V_4 + IL_006e: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0074: leave.s IL_008d + + } // end .try + catch [mscorlib]System.Exception + { + IL_0076: stloc.1 + IL_0077: ldarg.0 + IL_0078: ldc.i4.s -2 + IL_007a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_007f: ldarg.0 + IL_0080: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0085: ldloc.1 + IL_0086: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_008b: leave.s IL_00a0 + + } // end handler + IL_008d: ldarg.0 + IL_008e: ldc.i4.s -2 + IL_0090: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0095: ldarg.0 + IL_0096: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_009b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00a0: ret + } // end of method 'd__7'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__7'::SetStateMachine + + } // end of class 'd__7' + + .class auto ansi sealed nested private beforefieldinit 'd__a' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__$awaiterb' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 166 (0xa6) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_5, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_6) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_004b + + IL_000d: ldloca.s V_3 + IL_000f: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable + IL_0015: ldloc.3 + IL_0016: stloc.s V_4 + IL_0018: ldloca.s V_4 + IL_001a: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_001f: stloc.s V_5 + IL_0021: ldloca.s V_5 + IL_0023: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_0028: brtrue.s IL_006a + + IL_002a: ldarg.0 + IL_002b: ldc.i4.0 + IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_0031: ldarg.0 + IL_0032: ldloc.s V_5 + IL_0034: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>u__$awaiterb' + IL_0039: ldarg.0 + IL_003a: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_003f: ldloca.s V_5 + IL_0041: ldarg.0 + IL_0042: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__a'>(!!0&, + !!1&) + IL_0047: ldc.i4.0 + IL_0048: stloc.0 + IL_0049: leave.s IL_00a5 + + IL_004b: ldarg.0 + IL_004c: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>u__$awaiterb' + IL_0051: stloc.s V_5 + IL_0053: ldarg.0 + IL_0054: ldloca.s V_6 + IL_0056: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_005c: ldloc.s V_6 + IL_005e: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>u__$awaiterb' + IL_0063: ldarg.0 + IL_0064: ldc.i4.m1 + IL_0065: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_006a: ldloca.s V_5 + IL_006c: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_0071: ldloca.s V_5 + IL_0073: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0079: leave.s IL_0092 + + } // end .try + catch [mscorlib]System.Exception + { + IL_007b: stloc.1 + IL_007c: ldarg.0 + IL_007d: ldc.i4.s -2 + IL_007f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_0084: ldarg.0 + IL_0085: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_008a: ldloc.1 + IL_008b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0090: leave.s IL_00a5 + + } // end handler + IL_0092: ldarg.0 + IL_0093: ldc.i4.s -2 + IL_0095: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_009a: ldarg.0 + IL_009b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_00a0: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00a5: ret + } // end of method 'd__a'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__a'::SetStateMachine + + } // end of class 'd__a' + + .class auto ansi sealed nested private beforefieldinit 'd__d' + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaitere' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 189 (0xbd) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_4) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_0059 + + IL_000d: ldstr "Before" + IL_0012: call void [mscorlib]System.Console::WriteLine(string) + IL_0017: ldc.r8 1. + IL_0020: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0025: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_002a: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_002f: stloc.3 + IL_0030: ldloca.s V_3 + IL_0032: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0037: brtrue.s IL_0077 + + IL_0039: ldarg.0 + IL_003a: ldc.i4.0 + IL_003b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_0040: ldarg.0 + IL_0041: ldloc.3 + IL_0042: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>u__$awaitere' + IL_0047: ldarg.0 + IL_0048: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_004d: ldloca.s V_3 + IL_004f: ldarg.0 + IL_0050: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::AwaitUnsafeOnCompletedd__d'>(!!0&, + !!1&) + IL_0055: ldc.i4.0 + IL_0056: stloc.0 + IL_0057: leave.s IL_00bc + + IL_0059: ldarg.0 + IL_005a: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>u__$awaitere' + IL_005f: stloc.3 + IL_0060: ldarg.0 + IL_0061: ldloca.s V_4 + IL_0063: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0069: ldloc.s V_4 + IL_006b: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>u__$awaitere' + IL_0070: ldarg.0 + IL_0071: ldc.i4.m1 + IL_0072: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_0077: ldloca.s V_3 + IL_0079: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_007e: ldloca.s V_3 + IL_0080: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0086: ldstr "After" + IL_008b: call void [mscorlib]System.Console::WriteLine(string) + IL_0090: leave.s IL_00a9 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0092: stloc.1 + IL_0093: ldarg.0 + IL_0094: ldc.i4.s -2 + IL_0096: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_009b: ldarg.0 + IL_009c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_00a1: ldloc.1 + IL_00a2: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00a7: leave.s IL_00bc + + } // end handler + IL_00a9: ldarg.0 + IL_00aa: ldc.i4.s -2 + IL_00ac: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_00b1: ldarg.0 + IL_00b2: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_00b7: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_00bc: ret + } // end of method 'd__d'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__d'::SetStateMachine + + } // end of class 'd__d' + + .class auto ansi sealed nested private beforefieldinit 'd__10' + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 57 (0x39) + .maxstack 2 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldstr "No Await" + IL_0007: call void [mscorlib]System.Console::WriteLine(string) + IL_000c: leave.s IL_0025 + + } // end .try + catch [mscorlib]System.Exception + { + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldc.i4.s -2 + IL_0012: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>1__state' + IL_0017: ldarg.0 + IL_0018: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_001d: ldloc.1 + IL_001e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0023: leave.s IL_0038 + + } // end handler + IL_0025: ldarg.0 + IL_0026: ldc.i4.s -2 + IL_0028: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>1__state' + IL_002d: ldarg.0 + IL_002e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0033: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_0038: ret + } // end of method 'd__10'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__10'::SetStateMachine + + } // end of class 'd__10' + + .class auto ansi sealed nested private beforefieldinit 'd__12' + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter13' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 195 (0xc3) + .maxstack 3 + .locals init (bool V_0, + bool V_1, + class [mscorlib]System.Exception V_2, + int32 V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_5) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_0008: stloc.3 + IL_0009: ldloc.3 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_005b + + IL_000d: ldstr "Before" + IL_0012: call void [mscorlib]System.Console::WriteLine(string) + IL_0017: ldc.r8 1. + IL_0020: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0025: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_002a: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_002f: stloc.s V_4 + IL_0031: ldloca.s V_4 + IL_0033: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0038: brtrue.s IL_007a + + IL_003a: ldarg.0 + IL_003b: ldc.i4.0 + IL_003c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_0041: ldarg.0 + IL_0042: ldloc.s V_4 + IL_0044: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>u__$awaiter13' + IL_0049: ldarg.0 + IL_004a: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_004f: ldloca.s V_4 + IL_0051: ldarg.0 + IL_0052: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompletedd__12'>(!!0&, + !!1&) + IL_0057: ldc.i4.0 + IL_0058: stloc.0 + IL_0059: leave.s IL_00c2 + + IL_005b: ldarg.0 + IL_005c: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>u__$awaiter13' + IL_0061: stloc.s V_4 + IL_0063: ldarg.0 + IL_0064: ldloca.s V_5 + IL_0066: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_006c: ldloc.s V_5 + IL_006e: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>u__$awaiter13' + IL_0073: ldarg.0 + IL_0074: ldc.i4.m1 + IL_0075: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_007a: ldloca.s V_4 + IL_007c: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0081: ldloca.s V_4 + IL_0083: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0089: ldstr "After" + IL_008e: call void [mscorlib]System.Console::WriteLine(string) + IL_0093: ldc.i4.1 + IL_0094: stloc.1 + IL_0095: leave.s IL_00ae + + } // end .try + catch [mscorlib]System.Exception + { + IL_0097: stloc.2 + IL_0098: ldarg.0 + IL_0099: ldc.i4.s -2 + IL_009b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_00a0: ldarg.0 + IL_00a1: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_00a6: ldloc.2 + IL_00a7: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [mscorlib]System.Exception) + IL_00ac: leave.s IL_00c2 + + } // end handler + IL_00ae: ldarg.0 + IL_00af: ldc.i4.s -2 + IL_00b1: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_00b6: ldarg.0 + IL_00b7: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_00bc: ldloc.1 + IL_00bd: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_00c2: ret + } // end of method 'd__12'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__12'::SetStateMachine + + } // end of class 'd__12' + + .class auto ansi sealed nested private beforefieldinit 'd__15' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__$awaiter16' + .field private object '<>t__stack' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter17' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 310 (0x136) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_5, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_6) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: switch ( + IL_005e, + IL_00d1) + IL_0017: ldstr "Before" + IL_001c: call void [mscorlib]System.Console::WriteLine(string) + IL_0021: ldarg.0 + IL_0022: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>4__this' + IL_0027: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_002c: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_0031: stloc.3 + IL_0032: ldloca.s V_3 + IL_0034: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0039: brtrue.s IL_007c + + IL_003b: ldarg.0 + IL_003c: ldc.i4.0 + IL_003d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_0042: ldarg.0 + IL_0043: ldloc.3 + IL_0044: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter16' + IL_0049: ldarg.0 + IL_004a: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_004f: ldloca.s V_3 + IL_0051: ldarg.0 + IL_0052: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'>(!!0&, + !!1&) + IL_0057: ldc.i4.0 + IL_0058: stloc.0 + IL_0059: leave IL_0135 + + IL_005e: ldarg.0 + IL_005f: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter16' + IL_0064: stloc.3 + IL_0065: ldarg.0 + IL_0066: ldloca.s V_4 + IL_0068: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_006e: ldloc.s V_4 + IL_0070: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter16' + IL_0075: ldarg.0 + IL_0076: ldc.i4.m1 + IL_0077: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_007c: ldloca.s V_3 + IL_007e: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_0083: ldloca.s V_3 + IL_0085: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_008b: brfalse.s IL_00ff + + IL_008d: ldc.r8 1. + IL_0096: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_009b: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_00a0: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_00a5: stloc.s V_5 + IL_00a7: ldloca.s V_5 + IL_00a9: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_00ae: brtrue.s IL_00f0 + + IL_00b0: ldarg.0 + IL_00b1: ldc.i4.1 + IL_00b2: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_00b7: ldarg.0 + IL_00b8: ldloc.s V_5 + IL_00ba: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter17' + IL_00bf: ldarg.0 + IL_00c0: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_00c5: ldloca.s V_5 + IL_00c7: ldarg.0 + IL_00c8: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__15'>(!!0&, + !!1&) + IL_00cd: ldc.i4.0 + IL_00ce: stloc.0 + IL_00cf: leave.s IL_0135 + + IL_00d1: ldarg.0 + IL_00d2: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter17' + IL_00d7: stloc.s V_5 + IL_00d9: ldarg.0 + IL_00da: ldloca.s V_6 + IL_00dc: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_00e2: ldloc.s V_6 + IL_00e4: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>u__$awaiter17' + IL_00e9: ldarg.0 + IL_00ea: ldc.i4.m1 + IL_00eb: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_00f0: ldloca.s V_5 + IL_00f2: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_00f7: ldloca.s V_5 + IL_00f9: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_00ff: ldstr "After" + IL_0104: call void [mscorlib]System.Console::WriteLine(string) + IL_0109: leave.s IL_0122 + + } // end .try + catch [mscorlib]System.Exception + { + IL_010b: stloc.1 + IL_010c: ldarg.0 + IL_010d: ldc.i4.s -2 + IL_010f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_0114: ldarg.0 + IL_0115: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_011a: ldloc.1 + IL_011b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0120: leave.s IL_0135 + + } // end handler + IL_0122: ldarg.0 + IL_0123: ldc.i4.s -2 + IL_0125: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_012a: ldarg.0 + IL_012b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0130: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0135: ret + } // end of method 'd__15'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__15'::SetStateMachine + + } // end of class 'd__15' + + .class auto ansi sealed nested private beforefieldinit 'd__19' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__$awaiter1a' + .field private object '<>t__stack' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 175 (0xaf) + .maxstack 3 + .locals init (bool V_0, + class [mscorlib]System.Exception V_1, + int32 V_2, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_3, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_4) + .try + { + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_0008: stloc.2 + IL_0009: ldloc.2 + IL_000a: ldc.i4.0 + IL_000b: beq.s IL_0053 + + IL_000d: br.s IL_0019 + + IL_000f: ldstr "Body" + IL_0014: call void [mscorlib]System.Console::WriteLine(string) + IL_0019: ldarg.0 + IL_001a: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>4__this' + IL_001f: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_0024: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_0029: stloc.3 + IL_002a: ldloca.s V_3 + IL_002c: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0031: brtrue.s IL_0071 + + IL_0033: ldarg.0 + IL_0034: ldc.i4.0 + IL_0035: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_003a: ldarg.0 + IL_003b: ldloc.3 + IL_003c: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>u__$awaiter1a' + IL_0041: ldarg.0 + IL_0042: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0047: ldloca.s V_3 + IL_0049: ldarg.0 + IL_004a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'>(!!0&, + !!1&) + IL_004f: ldc.i4.0 + IL_0050: stloc.0 + IL_0051: leave.s IL_00ae + + IL_0053: ldarg.0 + IL_0054: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>u__$awaiter1a' + IL_0059: stloc.3 + IL_005a: ldarg.0 + IL_005b: ldloca.s V_4 + IL_005d: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0063: ldloc.s V_4 + IL_0065: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>u__$awaiter1a' + IL_006a: ldarg.0 + IL_006b: ldc.i4.m1 + IL_006c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_0071: ldloca.s V_3 + IL_0073: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_0078: ldloca.s V_3 + IL_007a: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0080: brtrue.s IL_000f + + IL_0082: leave.s IL_009b + + } // end .try + catch [mscorlib]System.Exception + { + IL_0084: stloc.1 + IL_0085: ldarg.0 + IL_0086: ldc.i4.s -2 + IL_0088: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_008d: ldarg.0 + IL_008e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0093: ldloc.1 + IL_0094: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0099: leave.s IL_00ae + + } // end handler + IL_009b: ldarg.0 + IL_009c: ldc.i4.s -2 + IL_009e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_00a3: ldarg.0 + IL_00a4: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_00a9: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00ae: ret + } // end of method 'd__19'::MoveNext + + .method private hidebysig newslot virtual final + instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine param0) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__19'::SetStateMachine + + } // end of class 'd__19' + + .method public hidebysig instance void + SimpleVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4A 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..JICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__0.. + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__0'>(!!0&) + IL_002d: ret + } // end of method Async::SimpleVoidMethod + + .method public hidebysig instance void + VoidMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 50 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..PICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 56 6F 69 64 4D 65 74 68 // .Async+d + 5F 5F 33 00 00 ) // __3.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__3'>(!!0&) + IL_002d: ret + } // end of method Async::VoidMethodWithoutAwait + + .method public hidebysig instance void + EmptyVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 49 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..IICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 45 6D 70 74 79 56 6F 69 // .Async+d__5.. + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__5'>(!!0&) + IL_002d: ret + } // end of method Async::EmptyVoidMethod + + .method public hidebysig instance void + AwaitYield() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 44 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..DICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 59 69 65 // .Async+d__7.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__7'>(!!0&) + IL_002d: ret + } // end of method Async::AwaitYield + + .method public hidebysig instance void + AwaitDefaultYieldAwaitable() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 54 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..TICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 44 65 66 // .Async+d__a.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__a'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__a'>(!!0&) + IL_002d: ret + } // end of method Async::AwaitDefaultYieldAwaitable + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + SimpleVoidTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__ + 64 00 00 ) // d.. + // Code size 58 (0x3a) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__d'>(!!0&) + IL_002d: ldloca.s V_0 + IL_002f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__d'::'<>t__builder' + IL_0034: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_0039: ret + } // end of method Async::SimpleVoidTaskMethod + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + TaskMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 51 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..QICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 61 73 6B 4D 65 74 68 // .Async+d + 5F 5F 31 30 00 00 ) // __10.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 58 (0x3a) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__10'>(!!0&) + IL_002d: ldloca.s V_0 + IL_002f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__10'::'<>t__builder' + IL_0034: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_0039: ret + } // end of method Async::TaskMethodWithoutAwait + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1 + SimpleBoolTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4F 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..OICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 42 6F // .Async+d__ + 31 32 00 00 ) // 12.. + // Code size 58 (0x3a) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Startd__12'>(!!0&) + IL_002d: ldloca.s V_0 + IL_002f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__12'::'<>t__builder' + IL_0034: call instance class [mscorlib]System.Threading.Tasks.Task`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() + IL_0039: ret + } // end of method Async::SimpleBoolTaskMethod + + .method public hidebysig instance void + TwoAwaitsWithDifferentAwaiterTypes() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5D 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..]ICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 77 6F 41 77 61 69 74 // .Async+d__15 + 00 00 ) + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__15'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__15'>(!!0&) + IL_002d: ret + } // end of method Async::TwoAwaitsWithDifferentAwaiterTypes + + .method public hidebysig instance void + AwaitInLoopCondition() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4F 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..OICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 49 6E 4C // .Async+d__ + 31 39 00 00 ) // 19.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 46 (0x2e) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>1__state' + IL_001c: ldloca.s V_0 + IL_001e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__19'::'<>t__builder' + IL_0023: stloc.1 + IL_0024: ldloca.s V_1 + IL_0026: ldloca.s V_0 + IL_0028: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__19'>(!!0&) + IL_002d: ret + } // end of method Async::AwaitInLoopCondition + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method Async::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Async.opt.res diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.roslyn.il new file mode 100644 index 000000000..064095550 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.roslyn.il @@ -0,0 +1,1348 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly Async +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .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 + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) + + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module Async.dll +// MVID: {604EE12E-00E7-4053-9C66-A0F3AD8C3B73} +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00670000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested private beforefieldinit 'd__0' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 184 (0xb8) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_1, + class [mscorlib]System.Exception V_2) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0056 + + IL_000a: ldstr "Before" + IL_000f: call void [mscorlib]System.Console::WriteLine(string) + IL_0014: ldc.r8 1. + IL_001d: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0022: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0027: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_002c: stloc.1 + IL_002d: ldloca.s V_1 + IL_002f: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0034: brtrue.s IL_0072 + + IL_0036: ldarg.0 + IL_0037: ldc.i4.0 + IL_0038: dup + IL_0039: stloc.0 + IL_003a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_003f: ldarg.0 + IL_0040: ldloc.1 + IL_0041: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__1' + IL_0046: ldarg.0 + IL_0047: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_004c: ldloca.s V_1 + IL_004e: ldarg.0 + IL_004f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__0'>(!!0&, + !!1&) + IL_0054: leave.s IL_00b7 + + IL_0056: ldarg.0 + IL_0057: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__1' + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__1' + IL_0063: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0069: ldarg.0 + IL_006a: ldc.i4.m1 + IL_006b: dup + IL_006c: stloc.0 + IL_006d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0072: ldloca.s V_1 + IL_0074: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0079: ldloca.s V_1 + IL_007b: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0081: ldstr "After" + IL_0086: call void [mscorlib]System.Console::WriteLine(string) + IL_008b: leave.s IL_00a4 + + } // end .try + catch [mscorlib]System.Exception + { + IL_008d: stloc.2 + IL_008e: ldarg.0 + IL_008f: ldc.i4.s -2 + IL_0091: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0096: ldarg.0 + IL_0097: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_009c: ldloc.2 + IL_009d: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00a2: leave.s IL_00b7 + + } // end handler + IL_00a4: ldarg.0 + IL_00a5: ldc.i4.s -2 + IL_00a7: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_00ac: ldarg.0 + IL_00ad: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00b2: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00b7: ret + } // end of method 'd__0'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__0'::SetStateMachine + + } // end of class 'd__0' + + .class auto ansi sealed nested private beforefieldinit 'd__1' + 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.AsyncVoidMethodBuilder '<>t__builder' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 55 (0x37) + .maxstack 2 + .locals init (class [mscorlib]System.Exception V_0) + .try + { + IL_0000: ldstr "No Await" + IL_0005: call void [mscorlib]System.Console::WriteLine(string) + IL_000a: leave.s IL_0023 + + } // end .try + catch [mscorlib]System.Exception + { + IL_000c: stloc.0 + IL_000d: ldarg.0 + IL_000e: ldc.i4.s -2 + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_0015: ldarg.0 + IL_0016: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_001b: ldloc.0 + IL_001c: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0021: leave.s IL_0036 + + } // end handler + IL_0023: ldarg.0 + IL_0024: ldc.i4.s -2 + IL_0026: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_002b: ldarg.0 + IL_002c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_0031: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0036: ret + } // end of method 'd__1'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__1'::SetStateMachine + + } // end of class 'd__1' + + .class auto ansi sealed nested private beforefieldinit 'd__2' + 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.AsyncVoidMethodBuilder '<>t__builder' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 45 (0x2d) + .maxstack 2 + .locals init (class [mscorlib]System.Exception V_0) + .try + { + IL_0000: leave.s IL_0019 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0002: stloc.0 + IL_0003: ldarg.0 + IL_0004: ldc.i4.s -2 + IL_0006: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_000b: ldarg.0 + IL_000c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0011: ldloc.0 + IL_0012: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0017: leave.s IL_002c + + } // end handler + IL_0019: ldarg.0 + IL_001a: ldc.i4.s -2 + IL_001c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_0021: ldarg.0 + IL_0022: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0027: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_002c: ret + } // end of method 'd__2'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__2'::SetStateMachine + + } // end of class 'd__2' + + .class auto ansi sealed nested private beforefieldinit '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.AsyncVoidMethodBuilder '<>t__builder' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__1' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 153 (0x99) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_2, + class [mscorlib]System.Exception V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0041 + + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable [mscorlib]System.Threading.Tasks.Task::Yield() + IL_000f: stloc.2 + IL_0010: ldloca.s V_2 + IL_0012: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_0017: stloc.1 + IL_0018: ldloca.s V_1 + IL_001a: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_001f: brtrue.s IL_005d + + IL_0021: ldarg.0 + IL_0022: ldc.i4.0 + IL_0023: dup + IL_0024: stloc.0 + IL_0025: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>u__1' + IL_0031: ldarg.0 + IL_0032: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0037: ldloca.s V_1 + IL_0039: ldarg.0 + IL_003a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__3'>(!!0&, + !!1&) + IL_003f: leave.s IL_0098 + + IL_0041: ldarg.0 + IL_0042: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>u__1' + IL_0047: stloc.1 + IL_0048: ldarg.0 + IL_0049: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>u__1' + IL_004e: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0054: ldarg.0 + IL_0055: ldc.i4.m1 + IL_0056: dup + IL_0057: stloc.0 + IL_0058: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_005d: ldloca.s V_1 + IL_005f: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_0064: ldloca.s V_1 + IL_0066: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_006c: leave.s IL_0085 + + } // end .try + catch [mscorlib]System.Exception + { + IL_006e: stloc.3 + IL_006f: ldarg.0 + IL_0070: ldc.i4.s -2 + IL_0072: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0077: ldarg.0 + IL_0078: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_007d: ldloc.3 + IL_007e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0083: leave.s IL_0098 + + } // end handler + IL_0085: ldarg.0 + IL_0086: ldc.i4.s -2 + IL_0088: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_008d: ldarg.0 + IL_008e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0093: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0098: ret + } // end of method 'd__3'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__3'::SetStateMachine + + } // end of class 'd__3' + + .class auto ansi sealed nested private beforefieldinit 'd__4' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__1' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 157 (0x9d) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_2, + class [mscorlib]System.Exception V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0045 + + IL_000a: ldloca.s V_2 + IL_000c: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable + IL_0012: ldloc.2 + IL_0013: stloc.2 + IL_0014: ldloca.s V_2 + IL_0016: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_001b: stloc.1 + IL_001c: ldloca.s V_1 + IL_001e: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_0023: brtrue.s IL_0061 + + IL_0025: ldarg.0 + IL_0026: ldc.i4.0 + IL_0027: dup + IL_0028: stloc.0 + IL_0029: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_002e: ldarg.0 + IL_002f: ldloc.1 + IL_0030: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>u__1' + IL_0035: ldarg.0 + IL_0036: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_003b: ldloca.s V_1 + IL_003d: ldarg.0 + IL_003e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__4'>(!!0&, + !!1&) + IL_0043: leave.s IL_009c + + IL_0045: ldarg.0 + IL_0046: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>u__1' + IL_004b: stloc.1 + IL_004c: ldarg.0 + IL_004d: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>u__1' + IL_0052: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0058: ldarg.0 + IL_0059: ldc.i4.m1 + IL_005a: dup + IL_005b: stloc.0 + IL_005c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0061: ldloca.s V_1 + IL_0063: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_0068: ldloca.s V_1 + IL_006a: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0070: leave.s IL_0089 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0072: stloc.3 + IL_0073: ldarg.0 + IL_0074: ldc.i4.s -2 + IL_0076: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_007b: ldarg.0 + IL_007c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_0081: ldloc.3 + IL_0082: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0087: leave.s IL_009c + + } // end handler + IL_0089: ldarg.0 + IL_008a: ldc.i4.s -2 + IL_008c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0091: ldarg.0 + IL_0092: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_0097: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_009c: ret + } // end of method 'd__4'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__4'::SetStateMachine + + } // end of class 'd__4' + + .class auto ansi sealed nested private beforefieldinit 'd__5' + 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 '<>t__builder' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 184 (0xb8) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_1, + class [mscorlib]System.Exception V_2) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0056 + + IL_000a: ldstr "Before" + IL_000f: call void [mscorlib]System.Console::WriteLine(string) + IL_0014: ldc.r8 1. + IL_001d: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0022: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0027: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_002c: stloc.1 + IL_002d: ldloca.s V_1 + IL_002f: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0034: brtrue.s IL_0072 + + IL_0036: ldarg.0 + IL_0037: ldc.i4.0 + IL_0038: dup + IL_0039: stloc.0 + IL_003a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_003f: ldarg.0 + IL_0040: ldloc.1 + IL_0041: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>u__1' + IL_0046: ldarg.0 + IL_0047: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_004c: ldloca.s V_1 + IL_004e: ldarg.0 + IL_004f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::AwaitUnsafeOnCompletedd__5'>(!!0&, + !!1&) + IL_0054: leave.s IL_00b7 + + IL_0056: ldarg.0 + IL_0057: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>u__1' + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>u__1' + IL_0063: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0069: ldarg.0 + IL_006a: ldc.i4.m1 + IL_006b: dup + IL_006c: stloc.0 + IL_006d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0072: ldloca.s V_1 + IL_0074: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0079: ldloca.s V_1 + IL_007b: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0081: ldstr "After" + IL_0086: call void [mscorlib]System.Console::WriteLine(string) + IL_008b: leave.s IL_00a4 + + } // end .try + catch [mscorlib]System.Exception + { + IL_008d: stloc.2 + IL_008e: ldarg.0 + IL_008f: ldc.i4.s -2 + IL_0091: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0096: ldarg.0 + IL_0097: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_009c: ldloc.2 + IL_009d: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00a2: leave.s IL_00b7 + + } // end handler + IL_00a4: ldarg.0 + IL_00a5: ldc.i4.s -2 + IL_00a7: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_00ac: ldarg.0 + IL_00ad: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_00b2: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_00b7: ret + } // end of method 'd__5'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__5'::SetStateMachine + + } // end of class 'd__5' + + .class auto ansi sealed nested private beforefieldinit 'd__6' + 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 '<>t__builder' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 55 (0x37) + .maxstack 2 + .locals init (class [mscorlib]System.Exception V_0) + .try + { + IL_0000: ldstr "No Await" + IL_0005: call void [mscorlib]System.Console::WriteLine(string) + IL_000a: leave.s IL_0023 + + } // end .try + catch [mscorlib]System.Exception + { + IL_000c: stloc.0 + IL_000d: ldarg.0 + IL_000e: ldc.i4.s -2 + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_0015: ldarg.0 + IL_0016: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_001b: ldloc.0 + IL_001c: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0021: leave.s IL_0036 + + } // end handler + IL_0023: ldarg.0 + IL_0024: ldc.i4.s -2 + IL_0026: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_002b: ldarg.0 + IL_002c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_0031: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_0036: ret + } // end of method 'd__6'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__6'::SetStateMachine + + } // end of class 'd__6' + + .class auto ansi sealed nested private beforefieldinit 'd__7' + 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 '<>t__builder' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 187 (0xbb) + .maxstack 3 + .locals init (int32 V_0, + bool V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_2, + class [mscorlib]System.Exception V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0056 + + IL_000a: ldstr "Before" + IL_000f: call void [mscorlib]System.Console::WriteLine(string) + IL_0014: ldc.r8 1. + IL_001d: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0022: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0027: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_002c: stloc.2 + IL_002d: ldloca.s V_2 + IL_002f: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_0034: brtrue.s IL_0072 + + IL_0036: ldarg.0 + IL_0037: ldc.i4.0 + IL_0038: dup + IL_0039: stloc.0 + IL_003a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_003f: ldarg.0 + IL_0040: ldloc.2 + IL_0041: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__1' + IL_0046: ldarg.0 + IL_0047: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_004c: ldloca.s V_2 + IL_004e: ldarg.0 + IL_004f: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompletedd__7'>(!!0&, + !!1&) + IL_0054: leave.s IL_00ba + + IL_0056: ldarg.0 + IL_0057: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__1' + IL_005c: stloc.2 + IL_005d: ldarg.0 + IL_005e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__1' + IL_0063: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0069: ldarg.0 + IL_006a: ldc.i4.m1 + IL_006b: dup + IL_006c: stloc.0 + IL_006d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0072: ldloca.s V_2 + IL_0074: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0079: ldloca.s V_2 + IL_007b: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0081: ldstr "After" + IL_0086: call void [mscorlib]System.Console::WriteLine(string) + IL_008b: ldc.i4.1 + IL_008c: stloc.1 + IL_008d: leave.s IL_00a6 + + } // end .try + catch [mscorlib]System.Exception + { + IL_008f: stloc.3 + IL_0090: ldarg.0 + IL_0091: ldc.i4.s -2 + IL_0093: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0098: ldarg.0 + IL_0099: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_009e: ldloc.3 + IL_009f: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [mscorlib]System.Exception) + IL_00a4: leave.s IL_00ba + + } // end handler + IL_00a6: ldarg.0 + IL_00a7: ldc.i4.s -2 + IL_00a9: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_00ae: ldarg.0 + IL_00af: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_00b4: ldloc.1 + IL_00b5: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_00ba: ret + } // end of method 'd__7'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__7'::SetStateMachine + + } // end of class 'd__7' + + .class auto ansi sealed nested private beforefieldinit 'd__8' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__1' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__2' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 297 (0x129) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_2, + class [mscorlib]System.Exception V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0058 + + IL_000a: ldloc.0 + IL_000b: ldc.i4.1 + IL_000c: beq IL_00c7 + + IL_0011: ldstr "Before" + IL_0016: call void [mscorlib]System.Console::WriteLine(string) + IL_001b: ldarg.0 + IL_001c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>4__this' + IL_0021: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_0026: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_002b: stloc.1 + IL_002c: ldloca.s V_1 + IL_002e: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0033: brtrue.s IL_0074 + + IL_0035: ldarg.0 + IL_0036: ldc.i4.0 + IL_0037: dup + IL_0038: stloc.0 + IL_0039: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_003e: ldarg.0 + IL_003f: ldloc.1 + IL_0040: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__1' + IL_0045: ldarg.0 + IL_0046: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_004b: ldloca.s V_1 + IL_004d: ldarg.0 + IL_004e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'>(!!0&, + !!1&) + IL_0053: leave IL_0128 + + IL_0058: ldarg.0 + IL_0059: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__1' + IL_005e: stloc.1 + IL_005f: ldarg.0 + IL_0060: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__1' + IL_0065: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_006b: ldarg.0 + IL_006c: ldc.i4.m1 + IL_006d: dup + IL_006e: stloc.0 + IL_006f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0074: ldloca.s V_1 + IL_0076: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_007b: ldloca.s V_1 + IL_007d: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0083: brfalse.s IL_00f2 + + IL_0085: ldc.r8 1. + IL_008e: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0093: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_0098: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_009d: stloc.2 + IL_009e: ldloca.s V_2 + IL_00a0: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_00a5: brtrue.s IL_00e3 + + IL_00a7: ldarg.0 + IL_00a8: ldc.i4.1 + IL_00a9: dup + IL_00aa: stloc.0 + IL_00ab: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_00b0: ldarg.0 + IL_00b1: ldloc.2 + IL_00b2: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__2' + IL_00b7: ldarg.0 + IL_00b8: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_00bd: ldloca.s V_2 + IL_00bf: ldarg.0 + IL_00c0: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__8'>(!!0&, + !!1&) + IL_00c5: leave.s IL_0128 + + IL_00c7: ldarg.0 + IL_00c8: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__2' + IL_00cd: stloc.2 + IL_00ce: ldarg.0 + IL_00cf: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__2' + IL_00d4: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_00da: ldarg.0 + IL_00db: ldc.i4.m1 + IL_00dc: dup + IL_00dd: stloc.0 + IL_00de: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_00e3: ldloca.s V_2 + IL_00e5: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_00ea: ldloca.s V_2 + IL_00ec: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_00f2: ldstr "After" + IL_00f7: call void [mscorlib]System.Console::WriteLine(string) + IL_00fc: leave.s IL_0115 + + } // end .try + catch [mscorlib]System.Exception + { + IL_00fe: stloc.3 + IL_00ff: ldarg.0 + IL_0100: ldc.i4.s -2 + IL_0102: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0107: ldarg.0 + IL_0108: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_010d: ldloc.3 + IL_010e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0113: leave.s IL_0128 + + } // end handler + IL_0115: ldarg.0 + IL_0116: ldc.i4.s -2 + IL_0118: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_011d: ldarg.0 + IL_011e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0123: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0128: ret + } // end of method 'd__8'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__8'::SetStateMachine + + } // end of class 'd__8' + + .class auto ansi sealed nested private beforefieldinit 'd__9' + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__1' + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 170 (0xaa) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_1, + class [mscorlib]System.Exception V_2) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: br.s IL_0016 + + IL_000c: ldstr "Body" + IL_0011: call void [mscorlib]System.Console::WriteLine(string) + IL_0016: ldarg.0 + IL_0017: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>4__this' + IL_001c: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_0021: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_0026: stloc.1 + IL_0027: ldloca.s V_1 + IL_0029: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_002e: brtrue.s IL_006c + + IL_0030: ldarg.0 + IL_0031: ldc.i4.0 + IL_0032: dup + IL_0033: stloc.0 + IL_0034: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_0039: ldarg.0 + IL_003a: ldloc.1 + IL_003b: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>u__1' + IL_0040: ldarg.0 + IL_0041: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0046: ldloca.s V_1 + IL_0048: ldarg.0 + IL_0049: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'>(!!0&, + !!1&) + IL_004e: leave.s IL_00a9 + + IL_0050: ldarg.0 + IL_0051: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>u__1' + IL_0056: stloc.1 + IL_0057: ldarg.0 + IL_0058: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>u__1' + IL_005d: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0063: ldarg.0 + IL_0064: ldc.i4.m1 + IL_0065: dup + IL_0066: stloc.0 + IL_0067: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_006c: ldloca.s V_1 + IL_006e: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_0073: ldloca.s V_1 + IL_0075: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_007b: brtrue.s IL_000c + + IL_007d: leave.s IL_0096 + + } // end .try + catch [mscorlib]System.Exception + { + IL_007f: stloc.2 + IL_0080: ldarg.0 + IL_0081: ldc.i4.s -2 + IL_0083: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_0088: ldarg.0 + IL_0089: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_008e: ldloc.2 + IL_008f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0094: leave.s IL_00a9 + + } // end handler + IL_0096: ldarg.0 + IL_0097: ldc.i4.s -2 + IL_0099: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_009e: ldarg.0 + IL_009f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_00a4: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00a9: ret + } // end of method 'd__9'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0006: ldarg.1 + IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine) + IL_000c: ret + } // end of method 'd__9'::SetStateMachine + + } // end of class 'd__9' + + .method public hidebysig instance void + SimpleVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4A 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..JICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__0.. + // Code size 37 (0x25) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__0'>(!!0&) + IL_0024: ret + } // end of method Async::SimpleVoidMethod + + .method public hidebysig instance void + VoidMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 50 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..PICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 56 6F 69 64 4D 65 74 68 // .Async+d + 5F 5F 31 00 00 ) // __1.. + // Code size 37 (0x25) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__1'>(!!0&) + IL_0024: ret + } // end of method Async::VoidMethodWithoutAwait + + .method public hidebysig instance void + EmptyVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 49 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..IICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 45 6D 70 74 79 56 6F 69 // .Async+d__2.. + // Code size 37 (0x25) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__2'>(!!0&) + IL_0024: ret + } // end of method Async::EmptyVoidMethod + + .method public hidebysig instance void + AwaitYield() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 44 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..DICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 59 69 65 // .Async+d__3.. + // Code size 37 (0x25) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__3'>(!!0&) + IL_0024: ret + } // end of method Async::AwaitYield + + .method public hidebysig instance void + AwaitDefaultYieldAwaitable() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 54 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..TICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 44 65 66 // .Async+d__4.. + // Code size 37 (0x25) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__4'>(!!0&) + IL_0024: ret + } // end of method Async::AwaitDefaultYieldAwaitable + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + SimpleVoidTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__ + 35 00 00 ) // 5.. + // Code size 49 (0x31) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__5'>(!!0&) + IL_0024: ldloca.s V_0 + IL_0026: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_002b: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_0030: ret + } // end of method Async::SimpleVoidTaskMethod + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + TaskMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 50 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..PICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 61 73 6B 4D 65 74 68 // .Async+d + 5F 5F 36 00 00 ) // __6.. + // Code size 49 (0x31) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__6'>(!!0&) + IL_0024: ldloca.s V_0 + IL_0026: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_002b: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_0030: ret + } // end of method Async::TaskMethodWithoutAwait + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1 + SimpleBoolTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 42 6F // .Async+d__ + 37 00 00 ) // 7.. + // Code size 49 (0x31) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 V_1) + IL_0000: ldloca.s V_0 + IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() + IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_000c: ldloca.s V_0 + IL_000e: ldc.i4.m1 + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0014: ldloc.0 + IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_001a: stloc.1 + IL_001b: ldloca.s V_1 + IL_001d: ldloca.s V_0 + IL_001f: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Startd__7'>(!!0&) + IL_0024: ldloca.s V_0 + IL_0026: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_002b: call instance class [mscorlib]System.Threading.Tasks.Task`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() + IL_0030: ret + } // end of method Async::SimpleBoolTaskMethod + + .method public hidebysig instance void + TwoAwaitsWithDifferentAwaiterTypes() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5C 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..\ICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 77 6F 41 77 61 69 74 // .Async+d__8. + 00 ) + // Code size 45 (0x2d) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_001c: ldloc.0 + IL_001d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0022: stloc.1 + IL_0023: ldloca.s V_1 + IL_0025: ldloca.s V_0 + IL_0027: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__8'>(!!0&) + IL_002c: ret + } // end of method Async::TwoAwaitsWithDifferentAwaiterTypes + + .method public hidebysig instance void + AwaitInLoopCondition() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 49 6E 4C // .Async+d__ + 39 00 00 ) // 9.. + // Code size 45 (0x2d) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: ldloca.s V_0 + IL_0002: ldarg.0 + IL_0003: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>4__this' + IL_0008: ldloca.s V_0 + IL_000a: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_000f: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0014: ldloca.s V_0 + IL_0016: ldc.i4.m1 + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_001c: ldloc.0 + IL_001d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0022: stloc.1 + IL_0023: ldloca.s V_1 + IL_0025: ldloca.s V_0 + IL_0027: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__9'>(!!0&) + IL_002c: ret + } // end of method Async::AwaitInLoopCondition + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method Async::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.roslyn.il new file mode 100644 index 000000000..ca0801c20 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.roslyn.il @@ -0,0 +1,1629 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly Async +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .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 + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) + + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module Async.dll +// MVID: {F94B40D1-C218-4C4E-9E56-CD94D73785EE} +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x02FD0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested private beforefieldinit 'd__0' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__0'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 198 (0xc6) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_1, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0' V_2, + class [mscorlib]System.Exception V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_000e + + IL_000c: br.s IL_0060 + + IL_000e: nop + IL_000f: ldstr "Before" + IL_0014: call void [mscorlib]System.Console::WriteLine(string) + IL_0019: nop + IL_001a: ldc.r8 1. + IL_0023: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0028: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_002d: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_0032: stloc.1 + IL_0033: ldloca.s V_1 + IL_0035: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_003a: brtrue.s IL_007c + + IL_003c: ldarg.0 + IL_003d: ldc.i4.0 + IL_003e: dup + IL_003f: stloc.0 + IL_0040: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_0045: ldarg.0 + IL_0046: ldloc.1 + IL_0047: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__1' + IL_004c: ldarg.0 + IL_004d: stloc.2 + IL_004e: ldarg.0 + IL_004f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0054: ldloca.s V_1 + IL_0056: ldloca.s V_2 + IL_0058: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__0'>(!!0&, + !!1&) + IL_005d: nop + IL_005e: leave.s IL_00c5 + + IL_0060: ldarg.0 + IL_0061: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__1' + IL_0066: stloc.1 + IL_0067: ldarg.0 + IL_0068: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>u__1' + IL_006d: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0073: ldarg.0 + IL_0074: ldc.i4.m1 + IL_0075: dup + IL_0076: stloc.0 + IL_0077: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_007c: ldloca.s V_1 + IL_007e: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0083: nop + IL_0084: ldloca.s V_1 + IL_0086: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_008c: ldstr "After" + IL_0091: call void [mscorlib]System.Console::WriteLine(string) + IL_0096: nop + IL_0097: leave.s IL_00b1 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0099: stloc.3 + IL_009a: ldarg.0 + IL_009b: ldc.i4.s -2 + IL_009d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_00a2: ldarg.0 + IL_00a3: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00a8: ldloc.3 + IL_00a9: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00ae: nop + IL_00af: leave.s IL_00c5 + + } // end handler + IL_00b1: ldarg.0 + IL_00b2: ldc.i4.s -2 + IL_00b4: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_00b9: ldarg.0 + IL_00ba: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_00bf: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00c4: nop + IL_00c5: ret + } // end of method 'd__0'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__0'::SetStateMachine + + } // end of class 'd__0' + + .class auto ansi sealed nested private beforefieldinit 'd__1' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__1'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 66 (0x42) + .maxstack 2 + .locals init (int32 V_0, + class [mscorlib]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: nop + IL_0008: ldstr "No Await" + IL_000d: call void [mscorlib]System.Console::WriteLine(string) + IL_0012: nop + IL_0013: leave.s IL_002d + + } // end .try + catch [mscorlib]System.Exception + { + IL_0015: stloc.1 + IL_0016: ldarg.0 + IL_0017: ldc.i4.s -2 + IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_001e: ldarg.0 + IL_001f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_0024: ldloc.1 + IL_0025: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_002a: nop + IL_002b: leave.s IL_0041 + + } // end handler + IL_002d: ldarg.0 + IL_002e: ldc.i4.s -2 + IL_0030: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_0035: ldarg.0 + IL_0036: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_003b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0040: nop + IL_0041: ret + } // end of method 'd__1'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__1'::SetStateMachine + + } // end of class 'd__1' + + .class auto ansi sealed nested private beforefieldinit 'd__2' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__2'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 55 (0x37) + .maxstack 2 + .locals init (int32 V_0, + class [mscorlib]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: nop + IL_0008: leave.s IL_0022 + + } // end .try + catch [mscorlib]System.Exception + { + IL_000a: stloc.1 + IL_000b: ldarg.0 + IL_000c: ldc.i4.s -2 + IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_0013: ldarg.0 + IL_0014: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0019: ldloc.1 + IL_001a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_001f: nop + IL_0020: leave.s IL_0036 + + } // end handler + IL_0022: ldarg.0 + IL_0023: ldc.i4.s -2 + IL_0025: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_002a: ldarg.0 + IL_002b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0030: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0035: nop + IL_0036: ret + } // end of method 'd__2'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__2'::SetStateMachine + + } // end of class 'd__2' + + .class auto ansi sealed nested private beforefieldinit 'd__3' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__1' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__3'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 167 (0xa7) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_2, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3' V_3, + class [mscorlib]System.Exception V_4) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_000e + + IL_000c: br.s IL_004a + + IL_000e: nop + IL_000f: call valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable [mscorlib]System.Threading.Tasks.Task::Yield() + IL_0014: stloc.2 + IL_0015: ldloca.s V_2 + IL_0017: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_001c: stloc.1 + IL_001d: ldloca.s V_1 + IL_001f: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_0024: brtrue.s IL_0066 + + IL_0026: ldarg.0 + IL_0027: ldc.i4.0 + IL_0028: dup + IL_0029: stloc.0 + IL_002a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_002f: ldarg.0 + IL_0030: ldloc.1 + IL_0031: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>u__1' + IL_0036: ldarg.0 + IL_0037: stloc.3 + IL_0038: ldarg.0 + IL_0039: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_003e: ldloca.s V_1 + IL_0040: ldloca.s V_3 + IL_0042: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__3'>(!!0&, + !!1&) + IL_0047: nop + IL_0048: leave.s IL_00a6 + + IL_004a: ldarg.0 + IL_004b: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>u__1' + IL_0050: stloc.1 + IL_0051: ldarg.0 + IL_0052: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>u__1' + IL_0057: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_005d: ldarg.0 + IL_005e: ldc.i4.m1 + IL_005f: dup + IL_0060: stloc.0 + IL_0061: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0066: ldloca.s V_1 + IL_0068: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_006d: nop + IL_006e: ldloca.s V_1 + IL_0070: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0076: leave.s IL_0092 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0078: stloc.s V_4 + IL_007a: ldarg.0 + IL_007b: ldc.i4.s -2 + IL_007d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_0082: ldarg.0 + IL_0083: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0088: ldloc.s V_4 + IL_008a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_008f: nop + IL_0090: leave.s IL_00a6 + + } // end handler + IL_0092: ldarg.0 + IL_0093: ldc.i4.s -2 + IL_0095: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_009a: ldarg.0 + IL_009b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_00a0: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00a5: nop + IL_00a6: ret + } // end of method 'd__3'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__3'::SetStateMachine + + } // end of class 'd__3' + + .class auto ansi sealed nested private beforefieldinit 'd__4' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter '<>u__1' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__4'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 171 (0xab) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable V_2, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4' V_3, + class [mscorlib]System.Exception V_4) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_000e + + IL_000c: br.s IL_004e + + IL_000e: nop + IL_000f: ldloca.s V_2 + IL_0011: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable + IL_0017: ldloc.2 + IL_0018: stloc.2 + IL_0019: ldloca.s V_2 + IL_001b: call instance valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter [mscorlib]System.Runtime.CompilerServices.YieldAwaitable::GetAwaiter() + IL_0020: stloc.1 + IL_0021: ldloca.s V_1 + IL_0023: call instance bool [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::get_IsCompleted() + IL_0028: brtrue.s IL_006a + + IL_002a: ldarg.0 + IL_002b: ldc.i4.0 + IL_002c: dup + IL_002d: stloc.0 + IL_002e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0033: ldarg.0 + IL_0034: ldloc.1 + IL_0035: stfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>u__1' + IL_003a: ldarg.0 + IL_003b: stloc.3 + IL_003c: ldarg.0 + IL_003d: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_0042: ldloca.s V_1 + IL_0044: ldloca.s V_3 + IL_0046: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__4'>(!!0&, + !!1&) + IL_004b: nop + IL_004c: leave.s IL_00aa + + IL_004e: ldarg.0 + IL_004f: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>u__1' + IL_0054: stloc.1 + IL_0055: ldarg.0 + IL_0056: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>u__1' + IL_005b: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_0061: ldarg.0 + IL_0062: ldc.i4.m1 + IL_0063: dup + IL_0064: stloc.0 + IL_0065: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_006a: ldloca.s V_1 + IL_006c: call instance void [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter::GetResult() + IL_0071: nop + IL_0072: ldloca.s V_1 + IL_0074: initobj [mscorlib]System.Runtime.CompilerServices.YieldAwaitable/YieldAwaiter + IL_007a: leave.s IL_0096 + + } // end .try + catch [mscorlib]System.Exception + { + IL_007c: stloc.s V_4 + IL_007e: ldarg.0 + IL_007f: ldc.i4.s -2 + IL_0081: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_0086: ldarg.0 + IL_0087: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_008c: ldloc.s V_4 + IL_008e: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0093: nop + IL_0094: leave.s IL_00aa + + } // end handler + IL_0096: ldarg.0 + IL_0097: ldc.i4.s -2 + IL_0099: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_009e: ldarg.0 + IL_009f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_00a4: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00a9: nop + IL_00aa: ret + } // end of method 'd__4'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__4'::SetStateMachine + + } // end of class 'd__4' + + .class auto ansi sealed nested private beforefieldinit 'd__5' + extends [mscorlib]System.Object + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__5'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 198 (0xc6) + .maxstack 3 + .locals init (int32 V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_1, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5' V_2, + class [mscorlib]System.Exception V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_000e + + IL_000c: br.s IL_0060 + + IL_000e: nop + IL_000f: ldstr "Before" + IL_0014: call void [mscorlib]System.Console::WriteLine(string) + IL_0019: nop + IL_001a: ldc.r8 1. + IL_0023: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0028: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_002d: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_0032: stloc.1 + IL_0033: ldloca.s V_1 + IL_0035: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_003a: brtrue.s IL_007c + + IL_003c: ldarg.0 + IL_003d: ldc.i4.0 + IL_003e: dup + IL_003f: stloc.0 + IL_0040: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_0045: ldarg.0 + IL_0046: ldloc.1 + IL_0047: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>u__1' + IL_004c: ldarg.0 + IL_004d: stloc.2 + IL_004e: ldarg.0 + IL_004f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0054: ldloca.s V_1 + IL_0056: ldloca.s V_2 + IL_0058: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::AwaitUnsafeOnCompletedd__5'>(!!0&, + !!1&) + IL_005d: nop + IL_005e: leave.s IL_00c5 + + IL_0060: ldarg.0 + IL_0061: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>u__1' + IL_0066: stloc.1 + IL_0067: ldarg.0 + IL_0068: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>u__1' + IL_006d: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0073: ldarg.0 + IL_0074: ldc.i4.m1 + IL_0075: dup + IL_0076: stloc.0 + IL_0077: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_007c: ldloca.s V_1 + IL_007e: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0083: nop + IL_0084: ldloca.s V_1 + IL_0086: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_008c: ldstr "After" + IL_0091: call void [mscorlib]System.Console::WriteLine(string) + IL_0096: nop + IL_0097: leave.s IL_00b1 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0099: stloc.3 + IL_009a: ldarg.0 + IL_009b: ldc.i4.s -2 + IL_009d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_00a2: ldarg.0 + IL_00a3: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_00a8: ldloc.3 + IL_00a9: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00ae: nop + IL_00af: leave.s IL_00c5 + + } // end handler + IL_00b1: ldarg.0 + IL_00b2: ldc.i4.s -2 + IL_00b4: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_00b9: ldarg.0 + IL_00ba: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_00bf: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_00c4: nop + IL_00c5: ret + } // end of method 'd__5'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__5'::SetStateMachine + + } // end of class 'd__5' + + .class auto ansi sealed nested private beforefieldinit 'd__6' + extends [mscorlib]System.Object + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__6'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 66 (0x42) + .maxstack 2 + .locals init (int32 V_0, + class [mscorlib]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: nop + IL_0008: ldstr "No Await" + IL_000d: call void [mscorlib]System.Console::WriteLine(string) + IL_0012: nop + IL_0013: leave.s IL_002d + + } // end .try + catch [mscorlib]System.Exception + { + IL_0015: stloc.1 + IL_0016: ldarg.0 + IL_0017: ldc.i4.s -2 + IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_001e: ldarg.0 + IL_001f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_0024: ldloc.1 + IL_0025: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_002a: nop + IL_002b: leave.s IL_0041 + + } // end handler + IL_002d: ldarg.0 + IL_002e: ldc.i4.s -2 + IL_0030: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_0035: ldarg.0 + IL_0036: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_003b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult() + IL_0040: nop + IL_0041: ret + } // end of method 'd__6'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__6'::SetStateMachine + + } // end of class 'd__6' + + .class auto ansi sealed nested private beforefieldinit 'd__7' + extends [mscorlib]System.Object + 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 '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__7'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 203 (0xcb) + .maxstack 3 + .locals init (int32 V_0, + bool V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_2, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7' V_3, + class [mscorlib]System.Exception V_4) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_000e + + IL_000c: br.s IL_0060 + + IL_000e: nop + IL_000f: ldstr "Before" + IL_0014: call void [mscorlib]System.Console::WriteLine(string) + IL_0019: nop + IL_001a: ldc.r8 1. + IL_0023: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_0028: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_002d: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_0032: stloc.2 + IL_0033: ldloca.s V_2 + IL_0035: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_003a: brtrue.s IL_007c + + IL_003c: ldarg.0 + IL_003d: ldc.i4.0 + IL_003e: dup + IL_003f: stloc.0 + IL_0040: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_0045: ldarg.0 + IL_0046: ldloc.2 + IL_0047: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__1' + IL_004c: ldarg.0 + IL_004d: stloc.3 + IL_004e: ldarg.0 + IL_004f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0054: ldloca.s V_2 + IL_0056: ldloca.s V_3 + IL_0058: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompletedd__7'>(!!0&, + !!1&) + IL_005d: nop + IL_005e: leave.s IL_00ca + + IL_0060: ldarg.0 + IL_0061: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__1' + IL_0066: stloc.2 + IL_0067: ldarg.0 + IL_0068: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>u__1' + IL_006d: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0073: ldarg.0 + IL_0074: ldc.i4.m1 + IL_0075: dup + IL_0076: stloc.0 + IL_0077: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_007c: ldloca.s V_2 + IL_007e: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0083: nop + IL_0084: ldloca.s V_2 + IL_0086: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_008c: ldstr "After" + IL_0091: call void [mscorlib]System.Console::WriteLine(string) + IL_0096: nop + IL_0097: ldc.i4.1 + IL_0098: stloc.1 + IL_0099: leave.s IL_00b5 + + } // end .try + catch [mscorlib]System.Exception + { + IL_009b: stloc.s V_4 + IL_009d: ldarg.0 + IL_009e: ldc.i4.s -2 + IL_00a0: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_00a5: ldarg.0 + IL_00a6: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_00ab: ldloc.s V_4 + IL_00ad: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [mscorlib]System.Exception) + IL_00b2: nop + IL_00b3: leave.s IL_00ca + + } // end handler + IL_00b5: ldarg.0 + IL_00b6: ldc.i4.s -2 + IL_00b8: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_00bd: ldarg.0 + IL_00be: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_00c3: ldloc.1 + IL_00c4: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_00c9: nop + IL_00ca: ret + } // end of method 'd__7'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__7'::SetStateMachine + + } // end of class 'd__7' + + .class auto ansi sealed nested private beforefieldinit 'd__8' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private bool '<>s__1' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__1' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__2' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__8'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 344 (0x158) + .maxstack 3 + .locals init (int32 V_0, + bool V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_2, + bool V_3, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8' V_4, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_5, + class [mscorlib]System.Exception V_6) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: br.s IL_000c + + IL_000c: ldloc.0 + IL_000d: ldc.i4.1 + IL_000e: beq.s IL_0014 + + IL_0010: br.s IL_0019 + + IL_0012: br.s IL_0067 + + IL_0014: br IL_00ee + + IL_0019: nop + IL_001a: ldstr "Before" + IL_001f: call void [mscorlib]System.Console::WriteLine(string) + IL_0024: nop + IL_0025: ldarg.0 + IL_0026: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>4__this' + IL_002b: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_0030: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_0035: stloc.2 + IL_0036: ldloca.s V_2 + IL_0038: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_003d: brtrue.s IL_0083 + + IL_003f: ldarg.0 + IL_0040: ldc.i4.0 + IL_0041: dup + IL_0042: stloc.0 + IL_0043: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0048: ldarg.0 + IL_0049: ldloc.2 + IL_004a: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__1' + IL_004f: ldarg.0 + IL_0050: stloc.s V_4 + IL_0052: ldarg.0 + IL_0053: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0058: ldloca.s V_2 + IL_005a: ldloca.s V_4 + IL_005c: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'>(!!0&, + !!1&) + IL_0061: nop + IL_0062: leave IL_0157 + + IL_0067: ldarg.0 + IL_0068: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__1' + IL_006d: stloc.2 + IL_006e: ldarg.0 + IL_006f: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__1' + IL_0074: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_007a: ldarg.0 + IL_007b: ldc.i4.m1 + IL_007c: dup + IL_007d: stloc.0 + IL_007e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0083: ldloca.s V_2 + IL_0085: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_008a: stloc.3 + IL_008b: ldloca.s V_2 + IL_008d: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0093: ldarg.0 + IL_0094: ldloc.3 + IL_0095: stfld bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>s__1' + IL_009a: ldarg.0 + IL_009b: ldfld bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>s__1' + IL_00a0: stloc.1 + IL_00a1: ldloc.1 + IL_00a2: brfalse.s IL_011c + + IL_00a4: nop + IL_00a5: ldc.r8 1. + IL_00ae: call valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::FromSeconds(float64) + IL_00b3: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(valuetype [mscorlib]System.TimeSpan) + IL_00b8: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter() + IL_00bd: stloc.s V_5 + IL_00bf: ldloca.s V_5 + IL_00c1: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted() + IL_00c6: brtrue.s IL_010b + + IL_00c8: ldarg.0 + IL_00c9: ldc.i4.1 + IL_00ca: dup + IL_00cb: stloc.0 + IL_00cc: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_00d1: ldarg.0 + IL_00d2: ldloc.s V_5 + IL_00d4: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__2' + IL_00d9: ldarg.0 + IL_00da: stloc.s V_4 + IL_00dc: ldarg.0 + IL_00dd: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_00e2: ldloca.s V_5 + IL_00e4: ldloca.s V_4 + IL_00e6: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompletedd__8'>(!!0&, + !!1&) + IL_00eb: nop + IL_00ec: leave.s IL_0157 + + IL_00ee: ldarg.0 + IL_00ef: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__2' + IL_00f4: stloc.s V_5 + IL_00f6: ldarg.0 + IL_00f7: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>u__2' + IL_00fc: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_0102: ldarg.0 + IL_0103: ldc.i4.m1 + IL_0104: dup + IL_0105: stloc.0 + IL_0106: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_010b: ldloca.s V_5 + IL_010d: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult() + IL_0112: nop + IL_0113: ldloca.s V_5 + IL_0115: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter + IL_011b: nop + IL_011c: ldstr "After" + IL_0121: call void [mscorlib]System.Console::WriteLine(string) + IL_0126: nop + IL_0127: leave.s IL_0143 + + } // end .try + catch [mscorlib]System.Exception + { + IL_0129: stloc.s V_6 + IL_012b: ldarg.0 + IL_012c: ldc.i4.s -2 + IL_012e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_0133: ldarg.0 + IL_0134: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0139: ldloc.s V_6 + IL_013b: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_0140: nop + IL_0141: leave.s IL_0157 + + } // end handler + IL_0143: ldarg.0 + IL_0144: ldc.i4.s -2 + IL_0146: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_014b: ldarg.0 + IL_014c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0151: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_0156: nop + IL_0157: ret + } // end of method 'd__8'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__8'::SetStateMachine + + } // end of class 'd__8' + + .class auto ansi sealed nested private beforefieldinit 'd__9' + extends [mscorlib]System.Object + 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.AsyncVoidMethodBuilder '<>t__builder' + .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async '<>4__this' + .field private bool '<>s__1' + .field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 '<>u__1' + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method 'd__9'::.ctor + + .method private hidebysig newslot virtual final + instance void MoveNext() cil managed + { + .override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + // Code size 206 (0xce) + .maxstack 3 + .locals init (int32 V_0, + bool V_1, + valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 V_2, + bool V_3, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9' V_4, + class [mscorlib]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_0006: stloc.0 + .try + { + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_000e + + IL_000c: br.s IL_005d + + IL_000e: nop + IL_000f: br.s IL_001e + + IL_0011: nop + IL_0012: ldstr "Body" + IL_0017: call void [mscorlib]System.Console::WriteLine(string) + IL_001c: nop + IL_001d: nop + IL_001e: ldarg.0 + IL_001f: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>4__this' + IL_0024: callvirt instance class [mscorlib]System.Threading.Tasks.Task`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async::SimpleBoolTaskMethod() + IL_0029: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 class [mscorlib]System.Threading.Tasks.Task`1::GetAwaiter() + IL_002e: stloc.2 + IL_002f: ldloca.s V_2 + IL_0031: call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0036: brtrue.s IL_0079 + + IL_0038: ldarg.0 + IL_0039: ldc.i4.0 + IL_003a: dup + IL_003b: stloc.0 + IL_003c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_0041: ldarg.0 + IL_0042: ldloc.2 + IL_0043: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>u__1' + IL_0048: ldarg.0 + IL_0049: stloc.s V_4 + IL_004b: ldarg.0 + IL_004c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0051: ldloca.s V_2 + IL_0053: ldloca.s V_4 + IL_0055: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::AwaitUnsafeOnCompleted,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'>(!!0&, + !!1&) + IL_005a: nop + IL_005b: leave.s IL_00cd + + IL_005d: ldarg.0 + IL_005e: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>u__1' + IL_0063: stloc.2 + IL_0064: ldarg.0 + IL_0065: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>u__1' + IL_006a: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0070: ldarg.0 + IL_0071: ldc.i4.m1 + IL_0072: dup + IL_0073: stloc.0 + IL_0074: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_0079: ldloca.s V_2 + IL_007b: call instance !0 valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_0080: stloc.3 + IL_0081: ldloca.s V_2 + IL_0083: initobj valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_0089: ldarg.0 + IL_008a: ldloc.3 + IL_008b: stfld bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>s__1' + IL_0090: ldarg.0 + IL_0091: ldfld bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>s__1' + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: brtrue IL_0011 + + IL_009d: leave.s IL_00b9 + + } // end .try + catch [mscorlib]System.Exception + { + IL_009f: stloc.s V_5 + IL_00a1: ldarg.0 + IL_00a2: ldc.i4.s -2 + IL_00a4: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_00a9: ldarg.0 + IL_00aa: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_00af: ldloc.s V_5 + IL_00b1: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetException(class [mscorlib]System.Exception) + IL_00b6: nop + IL_00b7: leave.s IL_00cd + + } // end handler + IL_00b9: ldarg.0 + IL_00ba: ldc.i4.s -2 + IL_00bc: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_00c1: ldarg.0 + IL_00c2: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_00c7: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::SetResult() + IL_00cc: nop + IL_00cd: ret + } // end of method 'd__9'::MoveNext + + .method private hidebysig newslot virtual final + 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 [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method 'd__9'::SetStateMachine + + } // end of class 'd__9' + + .method public hidebysig instance void + SimpleVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4A 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..JICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__0.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__0'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__0'>(!!0&) + IL_002f: ret + } // end of method Async::SimpleVoidMethod + + .method public hidebysig instance void + VoidMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 50 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..PICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 56 6F 69 64 4D 65 74 68 // .Async+d + 5F 5F 31 00 00 ) // __1.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__1'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__1'>(!!0&) + IL_002f: ret + } // end of method Async::VoidMethodWithoutAwait + + .method public hidebysig instance void + EmptyVoidMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 49 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..IICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 45 6D 70 74 79 56 6F 69 // .Async+d__2.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__2'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__2'>(!!0&) + IL_002f: ret + } // end of method Async::EmptyVoidMethod + + .method public hidebysig instance void + AwaitYield() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 44 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..DICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 59 69 65 // .Async+d__3.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__3'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__3'>(!!0&) + IL_002f: ret + } // end of method Async::AwaitYield + + .method public hidebysig instance void + AwaitDefaultYieldAwaitable() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 54 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..TICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 44 65 66 // .Async+d__4.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__4'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__4'>(!!0&) + IL_002f: ret + } // end of method Async::AwaitDefaultYieldAwaitable + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + SimpleVoidTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 56 6F // .Async+d__ + 35 00 00 ) // 5.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__5'>(!!0&) + IL_002f: ldloc.0 + IL_0030: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__5'::'<>t__builder' + IL_0035: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_003a: ret + } // end of method Async::SimpleVoidTaskMethod + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task + TaskMethodWithoutAwait() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 50 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..PICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 61 73 6B 4D 65 74 68 // .Async+d + 5F 5F 36 00 00 ) // __6.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Startd__6'>(!!0&) + IL_002f: ldloc.0 + IL_0030: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__6'::'<>t__builder' + IL_0035: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task() + IL_003a: ret + } // end of method Async::TaskMethodWithoutAwait + + .method public hidebysig instance class [mscorlib]System.Threading.Tasks.Task`1 + SimpleBoolTaskMethod() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 53 69 6D 70 6C 65 42 6F // .Async+d__ + 37 00 00 ) // 7.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Startd__7'>(!!0&) + IL_002f: ldloc.0 + IL_0030: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__7'::'<>t__builder' + IL_0035: call instance class [mscorlib]System.Threading.Tasks.Task`1 valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() + IL_003a: ret + } // end of method Async::SimpleBoolTaskMethod + + .method public hidebysig instance void + TwoAwaitsWithDifferentAwaiterTypes() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5C 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..\ICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 54 77 6F 41 77 61 69 74 // .Async+d__8. + 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__8'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__8'>(!!0&) + IL_002f: ret + } // end of method Async::TwoAwaitsWithDifferentAwaiterTypes + + .method public hidebysig instance void + AwaitInLoopCondition() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 4E 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..NICSharpCode.D + 65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests. + 54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty + 2E 41 73 79 6E 63 2B 3C 41 77 61 69 74 49 6E 4C // .Async+d__ + 39 00 00 ) // 9.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9' V_0, + valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder V_1) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>4__this' + IL_000d: ldloc.0 + IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Create() + IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0018: ldloc.0 + IL_0019: ldc.i4.m1 + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>1__state' + IL_001f: ldloc.0 + IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async/'d__9'::'<>t__builder' + IL_0025: stloc.1 + IL_0026: ldloca.s V_1 + IL_0028: ldloca.s V_0 + IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncVoidMethodBuilder::Startd__9'>(!!0&) + IL_002f: ret + } // end of method Async::AwaitInLoopCondition + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method Async::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Async + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il index d9973cdff..b13e4d04e 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il @@ -10,25 +10,25 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } -.assembly yrrhbyx4 +.assembly rxpttcc3 { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .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 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .permissionset reqmin = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} .hash algorithm 0x00008004 .ver 0:0:0:0 } -.module yrrhbyx4.dll -// MVID: {82665BB0-B310-40F8-A171-DB3485D8CA3B} +.module rxpttcc3.dll +// MVID: {1FF2BE16-6925-4D61-92AB-530ECA34D69F} .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .imagebase 0x10000000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01350000 +// Image base: 0x01200000 // =============== CLASS MEMBERS DECLARATION =================== @@ -42,6 +42,34 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private static class [mscorlib]System.EventHandler 'CS$<>9__CachedAnonymousMethodDelegate1' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig specialname instance int32 + get_Value() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 11 (0xb) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method PropertiesAndEvents::get_Value + + .method private hidebysig specialname instance void + set_Value(int32 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0007: ret + } // end of method PropertiesAndEvents::set_Value + .method public hidebysig specialname instance void add_AutomaticEvent(class [mscorlib]System.EventHandler 'value') cil managed { @@ -228,34 +256,6 @@ IL_0009: ret } // end of method PropertiesAndEvents::remove_CustomEvent - .method public hidebysig specialname instance int32 - get_Value() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 11 (0xb) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method PropertiesAndEvents::get_Value - - .method private hidebysig specialname instance void - set_Value(int32 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0007: ret - } // end of method PropertiesAndEvents::set_Value - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { @@ -298,13 +298,13 @@ } // end of event PropertiesAndEvents::AutomaticEvent .event [mscorlib]System.EventHandler AutomaticEventWithInitializer { - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler) .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler) } // end of event PropertiesAndEvents::AutomaticEventWithInitializer .event [mscorlib]System.EventHandler CustomEvent { - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler) .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_CustomEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler) } // end of event PropertiesAndEvents::CustomEvent .property instance int32 Value() { @@ -317,4 +317,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file ../../Tests/TestCases/Pretty\PropertiesAndEvents.res +// WARNING: Created Win32 resource file ../../../TestCases/Pretty\PropertiesAndEvents.res diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il index 87dc99ac6..54bd4b723 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il @@ -10,25 +10,25 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } -.assembly mntxd4ks +.assembly izb3o5sr { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .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 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .permissionset reqmin = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} .hash algorithm 0x00008004 .ver 0:0:0:0 } -.module mntxd4ks.dll -// MVID: {29E42430-0417-4F94-9661-223B88060574} +.module izb3o5sr.dll +// MVID: {8A2B95C7-4655-426C-A216-92C7BBB9D7D5} .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .imagebase 0x10000000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x03170000 +// Image base: 0x00DE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -42,6 +42,29 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private static class [mscorlib]System.EventHandler 'CS$<>9__CachedAnonymousMethodDelegate1' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig specialname instance int32 + get_Value() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0006: ret + } // end of method PropertiesAndEvents::get_Value + + .method private hidebysig specialname instance void + set_Value(int32 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0007: ret + } // end of method PropertiesAndEvents::set_Value + .method public hidebysig specialname instance void add_AutomaticEvent(class [mscorlib]System.EventHandler 'value') cil managed { @@ -200,29 +223,6 @@ IL_0007: ret } // end of method PropertiesAndEvents::remove_CustomEvent - .method public hidebysig specialname instance int32 - get_Value() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0006: ret - } // end of method PropertiesAndEvents::get_Value - - .method private hidebysig specialname instance void - set_Value(int32 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0007: ret - } // end of method PropertiesAndEvents::set_Value - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { @@ -261,13 +261,13 @@ } // end of event PropertiesAndEvents::AutomaticEvent .event [mscorlib]System.EventHandler AutomaticEventWithInitializer { - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler) .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler) } // end of event PropertiesAndEvents::AutomaticEventWithInitializer .event [mscorlib]System.EventHandler CustomEvent { - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler) .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_CustomEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler) } // end of event PropertiesAndEvents::CustomEvent .property instance int32 Value() { @@ -280,4 +280,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file ../../Tests/TestCases/Pretty\PropertiesAndEvents.opt.res +// WARNING: Created Win32 resource file ../../../TestCases/Pretty\PropertiesAndEvents.opt.res diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il index b73cef0c6..7bc345323 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il @@ -25,14 +25,14 @@ .ver 0:0:0:0 } .module PropertiesAndEvents.dll -// MVID: {D731F1E1-A512-4199-834A-9BCA95572A0B} +// MVID: {10E5705F-7F26-4317-B44C-F957A4E21EAC} .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .imagebase 0x10000000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02610000 +// Image base: 0x015B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,12 +77,35 @@ } // end of class '<>c' + .field private int32 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private class [mscorlib]System.EventHandler AutomaticEvent .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private notserialized class [mscorlib]System.EventHandler AutomaticEventWithInitializer .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private int32 'k__BackingField' - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig specialname instance int32 + get_Value() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0006: ret + } // end of method PropertiesAndEvents::get_Value + + .method private hidebysig specialname instance void + set_Value(int32 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0007: ret + } // end of method PropertiesAndEvents::set_Value + .method public hidebysig specialname instance void add_AutomaticEvent(class [mscorlib]System.EventHandler 'value') cil managed { @@ -245,29 +268,6 @@ IL_0007: ret } // end of method PropertiesAndEvents::remove_CustomEvent - .method public hidebysig specialname instance int32 - get_Value() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0006: ret - } // end of method PropertiesAndEvents::get_Value - - .method private hidebysig specialname instance void - set_Value(int32 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0007: ret - } // end of method PropertiesAndEvents::set_Value - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il index 82d668f75..86cc68fa8 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il @@ -25,14 +25,14 @@ .ver 0:0:0:0 } .module PropertiesAndEvents.dll -// MVID: {C89A39C6-EF4C-4E8A-AC45-3619FA7A8CCD} +// MVID: {978432C8-A999-48CF-A173-68805B029A1E} .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .imagebase 0x10000000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x017D0000 +// Image base: 0x00E70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -79,15 +79,38 @@ } // end of class '<>c' - .field private class [mscorlib]System.EventHandler AutomaticEvent + .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field private notserialized class [mscorlib]System.EventHandler AutomaticEventWithInitializer + .field private class [mscorlib]System.EventHandler AutomaticEvent .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field private int32 'k__BackingField' + .field private notserialized class [mscorlib]System.EventHandler AutomaticEventWithInitializer .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 + get_Value() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0006: ret + } // end of method PropertiesAndEvents::get_Value + + .method private hidebysig specialname instance void + set_Value(int32 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' + IL_0007: ret + } // end of method PropertiesAndEvents::set_Value + .method public hidebysig specialname instance void add_AutomaticEvent(class [mscorlib]System.EventHandler 'value') cil managed { @@ -254,29 +277,6 @@ IL_0009: ret } // end of method PropertiesAndEvents::remove_CustomEvent - .method public hidebysig specialname instance int32 - get_Value() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0006: ret - } // end of method PropertiesAndEvents::get_Value - - .method private hidebysig specialname instance void - set_Value(int32 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'k__BackingField' - IL_0007: ret - } // end of method PropertiesAndEvents::set_Value - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed {