diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs index 2179a6a82..e6f63925c 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs @@ -17,16 +17,42 @@ // DEALINGS IN THE SOFTWARE. using System; +using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading; -namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty +namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests { - public class InitializerTests + public static class Extensions + { + public static void Add(this TestCases.CustomList inst, int a, int b) + { + } + } + + public class TestCases { #region Types and helpers + public class CustomList : IEnumerable, IEnumerable + { + public IEnumerator GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + public void Add(string name) + { + new Dictionary().Add(name, typeof(T2)); + } + } + public class C { public int Z; @@ -206,9 +232,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty public static void InvalidIndices2(int a) { +#pragma warning disable 251 int[] array = new int[1]; array[-1] = a; X(Y(), array); +#pragma warning restore } public static void IndicesInWrongOrder(int a, int b) @@ -219,6 +247,29 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty X(Y(), array); } + public static CustomList ExtensionMethodInCollectionInitializer() + { +#if CS60 + return new CustomList { + { + 1, + 2 + } + }; +#else + CustomList customList = new CustomList(); + customList.Add(1, 2); + return customList; +#endif + } + + public static void NoCollectionInitializerBecauseOfTypeArguments() + { + CustomList customList = new CustomList(); + customList.Add("int"); + Console.WriteLine(customList); + } + public static void CollectionInitializerList() { X(Y(), new List { diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il index f6cc954c2..65afd10d5 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il @@ -16,6 +16,7 @@ .assembly InitializerTests { .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.ExtensionAttribute::.ctor() = ( 01 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. .permissionset reqmin @@ -34,15 +35,88 @@ // =============== CLASS MEMBERS DECLARATION =================== -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions extends [mscorlib]System.Object { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig static void Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 inst, + int32 a, + int32 b) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method Extensions::Add + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases + extends [mscorlib]System.Object +{ + .class auto ansi nested public beforefieldinit CustomList`1 + extends [mscorlib]System.Object + implements class [mscorlib]System.Collections.Generic.IEnumerable`1, + [mscorlib]System.Collections.IEnumerable + { + .method public hidebysig newslot virtual final + instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetEnumerator() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: nop + IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0006: throw + } // end of method CustomList`1::GetEnumerator + + .method private hidebysig newslot virtual final + instance class [mscorlib]System.Collections.IEnumerator + System.Collections.IEnumerable.GetEnumerator() cil managed + { + .override [mscorlib]System.Collections.IEnumerable::GetEnumerator + // Code size 7 (0x7) + .maxstack 8 + IL_0000: nop + IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0006: throw + } // end of method CustomList`1::System.Collections.IEnumerable.GetEnumerator + + .method public hidebysig instance void + Add(string name) cil managed + { + // Code size 24 (0x18) + .maxstack 8 + IL_0000: nop + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0006: ldarg.1 + IL_0007: ldtoken !!T2 + IL_000c: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) + IL_0011: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) + IL_0016: nop + IL_0017: ret + } // end of method CustomList`1::Add + + .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 CustomList`1::.ctor + + } // end of class CustomList`1 + .class auto ansi nested public beforefieldinit C extends [mscorlib]System.Object { .field public int32 Z - .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S Y - .field public class [mscorlib]System.Collections.Generic.List`1 L + .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S Y + .field public class [mscorlib]System.Collections.Generic.List`1 L .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { @@ -68,10 +142,10 @@ IL_0000: nop IL_0001: ldarg.0 IL_0002: ldarg.1 - IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0008: ldarg.0 IL_0009: ldc.i4.0 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_000f: ret } // end of method S::.ctor @@ -81,44 +155,44 @@ extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum a = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum b = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b = int32(0x00000001) } // end of class MyEnum .class auto ansi sealed nested private MyEnum2 extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 c = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 d = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 c = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 d = int32(0x00000001) } // end of class MyEnum2 .class auto ansi nested private beforefieldinit Data extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. - .field public class [mscorlib]System.Collections.Generic.List`1 FieldList + .field public class [mscorlib]System.Collections.Generic.List`1 FieldList .field private class [mscorlib]System.EventHandler TestEvent - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' + .field private class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_a() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum V_0) IL_0000: ldarg.0 - IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -127,27 +201,27 @@ } // end of method Data::get_a .method public hidebysig specialname - instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_a .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_b() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum V_0) IL_0000: ldarg.0 - IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -156,27 +230,27 @@ } // end of method Data::get_b .method public hidebysig specialname - instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_b .method public hidebysig specialname - instance class [mscorlib]System.Collections.Generic.List`1 + instance class [mscorlib]System.Collections.Generic.List`1 get_PropertyList() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 - .locals init (class [mscorlib]System.Collections.Generic.List`1 V_0) + .locals init (class [mscorlib]System.Collections.Generic.List`1 V_0) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -185,27 +259,27 @@ } // end of method Data::get_PropertyList .method public hidebysig specialname - instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 'value') cil managed + instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 '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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_PropertyList .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: ldarg.0 - IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -214,27 +288,27 @@ } // end of method Data::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_MoreData .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData get_NestedStruct() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: ldarg.0 - IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -243,24 +317,24 @@ } // end of method Data::get_NestedStruct .method public hidebysig specialname - instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'value') cil managed + instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_NestedStruct .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i) cil managed { // Code size 7 (0x7) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop IL_0001: ldnull IL_0002: stloc.0 @@ -272,7 +346,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 2 (0x2) .maxstack 8 @@ -281,13 +355,13 @@ } // end of method Data::set_Item .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i, string j) cil managed { // Code size 7 (0x7) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop IL_0001: ldnull IL_0002: stloc.0 @@ -300,7 +374,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, string j, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 2 (0x2) .maxstack 8 @@ -318,7 +392,7 @@ class [mscorlib]System.EventHandler V_2, bool V_3) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -329,7 +403,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -358,7 +432,7 @@ class [mscorlib]System.EventHandler V_2, bool V_3) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -369,7 +443,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -394,8 +468,8 @@ // Code size 19 (0x13) .maxstack 8 IL_0000: ldarg.0 - IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_000b: ldarg.0 IL_000c: call instance void [mscorlib]System.Object::.ctor() IL_0011: nop @@ -404,55 +478,55 @@ .event [mscorlib]System.EventHandler TestEvent { - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::remove_TestEvent(class [mscorlib]System.EventHandler) - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::remove_TestEvent(class [mscorlib]System.EventHandler) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) } // end of event Data::TestEvent - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_a() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_a() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::a - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_b() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_b() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::b - .property instance class [mscorlib]System.Collections.Generic.List`1 + .property instance class [mscorlib]System.Collections.Generic.List`1 PropertyList() { - .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) } // end of property Data::PropertyList - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() } // end of property Data::MoreData - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData NestedStruct() { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_NestedStruct() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_NestedStruct() } // end of property Data::NestedStruct - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32) { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) } // end of property Data::Item - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32, string) { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - string, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32, - string) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + string, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32, + string) } // end of property Data::Item } // end of class Data @@ -462,7 +536,7 @@ .field public int32 Field .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed @@ -472,7 +546,7 @@ .maxstack 1 .locals init (int32 V_0) IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -488,20 +562,20 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_Property .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: ldarg.0 - IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: stloc.0 IL_0007: br.s IL_0009 @@ -510,14 +584,14 @@ } // end of method StructData::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_MoreData @@ -528,27 +602,27 @@ .maxstack 8 IL_0000: nop IL_0001: ldarg.0 - IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0008: ldarg.0 IL_0009: ldarg.1 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_000f: ldarg.0 IL_0010: ldarg.1 - IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0016: nop IL_0017: ret } // end of method StructData::.ctor .property instance int32 Property() { - .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_Property() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_Property() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) } // end of property StructData::Property - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property StructData::MoreData } // end of class StructData @@ -563,7 +637,7 @@ .maxstack 8 IL_0000: nop IL_0001: ret - } // end of method InitializerTests::X + } // end of method TestCases::X .method private hidebysig static object Y() cil managed @@ -578,7 +652,7 @@ IL_0005: ldloc.0 IL_0006: ret - } // end of method InitializerTests::Y + } // end of method TestCases::Y .method public hidebysig static void TestCall(int32 a, class [mscorlib]System.Threading.Thread thread) cil managed @@ -587,15 +661,15 @@ .maxstack 8 IL_0000: nop IL_0001: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C TestCall(int32 a, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C c) cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C c) cil managed { // Code size 7 (0x7) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) IL_0000: nop IL_0001: ldarg.1 IL_0002: stloc.0 @@ -603,26 +677,26 @@ IL_0005: ldloc.0 IL_0006: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1() cil managed { // Code size 42 (0x2a) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_000d: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_000d: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0012: ldloc.0 - IL_0013: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0013: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0018: ldc.i4.1 - IL_0019: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_001e: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0019: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_001e: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0023: nop IL_0024: ldloc.0 IL_0025: stloc.1 @@ -630,146 +704,146 @@ IL_0028: ldloc.1 IL_0029: ret - } // end of method InitializerTests::Test1 + } // end of method TestCases::Test1 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1Alternative() cil managed { // Code size 45 (0x2d) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class [mscorlib]System.Collections.Generic.List`1 V_1, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_2) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class [mscorlib]System.Collections.Generic.List`1 V_1, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_2) IL_0000: nop IL_0001: ldc.i4.1 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0007: stloc.0 IL_0008: ldloc.0 - IL_0009: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0009: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000e: stloc.1 IL_000f: ldloc.1 IL_0010: ldc.i4.1 - IL_0011: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_0016: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0011: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_0016: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001b: nop IL_001c: ldloc.1 - IL_001d: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_001d: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0022: ldloc.0 - IL_0023: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_0023: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_0028: stloc.2 IL_0029: br.s IL_002b IL_002b: ldloc.2 IL_002c: ret - } // end of method InitializerTests::Test1Alternative + } // end of method TestCases::Test1Alternative - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test2() cil managed { // Code size 27 (0x1b) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000e: ldloc.0 IL_000f: ldc.i4.2 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_0015: ldloc.0 IL_0016: stloc.1 IL_0017: br.s IL_0019 IL_0019: ldloc.1 IL_001a: ret - } // end of method InitializerTests::Test2 + } // end of method TestCases::Test2 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3() cil managed { // Code size 37 (0x25) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.1 - IL_0009: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_000e: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0009: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_000e: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0013: ldloc.0 - IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0019: ldc.i4.2 - IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_001f: ldloc.0 IL_0020: stloc.1 IL_0021: br.s IL_0023 IL_0023: ldloc.1 IL_0024: ret - } // end of method InitializerTests::Test3 + } // end of method TestCases::Test3 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3b() cil managed { // Code size 38 (0x26) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop IL_0001: ldc.i4.0 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0007: stloc.0 IL_0008: ldloc.0 IL_0009: ldc.i4.1 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000f: ldloc.0 - IL_0010: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0010: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0015: ldc.i4.2 - IL_0016: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0016: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_001b: ldloc.0 - IL_001c: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_001c: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_0021: stloc.1 IL_0022: br.s IL_0024 IL_0024: ldloc.1 IL_0025: ret - } // end of method InitializerTests::Test3b + } // end of method TestCases::Test3b - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test4() cil managed { // Code size 44 (0x2c) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0008: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_000d: ldc.i4.1 - IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0013: ldloc.0 IL_0014: ldc.i4.2 - IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_001a: ldloc.0 - IL_001b: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_001b: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0020: ldc.i4.3 - IL_0021: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_0021: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_0026: ldloc.0 IL_0027: stloc.1 IL_0028: br.s IL_002a IL_002a: ldloc.1 IL_002b: ret - } // end of method InitializerTests::Test4 + } // end of method TestCases::Test4 .method public hidebysig static void InvalidIndices(int32 a) cil managed { @@ -784,13 +858,13 @@ IL_0009: ldc.i4.1 IL_000a: ldarg.0 IL_000b: stelem.i4 - IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0011: ldloc.0 - IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0017: nop IL_0018: ret - } // end of method InitializerTests::InvalidIndices + } // end of method TestCases::InvalidIndices .method public hidebysig static void InvalidIndices2(int32 a) cil managed { @@ -805,13 +879,13 @@ IL_0009: ldc.i4.m1 IL_000a: ldarg.0 IL_000b: stelem.i4 - IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0011: ldloc.0 - IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0017: nop IL_0018: ret - } // end of method InitializerTests::InvalidIndices2 + } // end of method TestCases::InvalidIndices2 .method public hidebysig static void IndicesInWrongOrder(int32 a, int32 b) cil managed @@ -831,13 +905,56 @@ IL_000d: ldc.i4.1 IL_000e: ldarg.0 IL_000f: stelem.i4 - IL_0010: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0010: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0015: ldloc.0 - IL_0016: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0016: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001b: nop IL_001c: ret - } // end of method InitializerTests::IndicesInWrongOrder + } // end of method TestCases::IndicesInWrongOrder + + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 + ExtensionMethodInCollectionInitializer() cil managed + { + // Code size 22 (0x16) + .maxstack 3 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_1) + IL_0000: nop + IL_0001: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldc.i4.1 + IL_0009: ldc.i4.2 + IL_000a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions::Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1, + int32, + int32) + IL_000f: nop + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: br.s IL_0014 + + IL_0014: ldloc.1 + IL_0015: ret + } // end of method TestCases::ExtensionMethodInCollectionInitializer + + .method public hidebysig static void NoCollectionInitializerBecauseOfTypeArguments() cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_0) + IL_0000: nop + IL_0001: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldstr "int" + IL_000d: callvirt instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::Add(string) + IL_0012: nop + IL_0013: ldloc.0 + IL_0014: call void [mscorlib]System.Console::WriteLine(object) + IL_0019: nop + IL_001a: ret + } // end of method TestCases::NoCollectionInitializerBecauseOfTypeArguments .method public hidebysig static void CollectionInitializerList() cil managed { @@ -845,7 +962,7 @@ .maxstack 3 .locals init (class [mscorlib]System.Collections.Generic.List`1 V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 @@ -861,11 +978,11 @@ IL_001e: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0023: nop IL_0024: ldloc.0 - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::CollectionInitializerList + } // end of method TestCases::CollectionInitializerList .method public hidebysig static object RecursiveCollectionInitializer() cil managed @@ -887,7 +1004,7 @@ IL_0013: ldloc.1 IL_0014: ret - } // end of method InitializerTests::RecursiveCollectionInitializer + } // end of method TestCases::RecursiveCollectionInitializer .method public hidebysig static void CollectionInitializerDictionary() cil managed { @@ -895,7 +1012,7 @@ .maxstack 4 .locals init (class [mscorlib]System.Collections.Generic.Dictionary`2 V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 @@ -917,39 +1034,39 @@ !1) IL_0032: nop IL_0033: ldloc.0 - IL_0034: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0034: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0039: nop IL_003a: ret - } // end of method InitializerTests::CollectionInitializerDictionary + } // end of method TestCases::CollectionInitializerDictionary .method public hidebysig static void CollectionInitializerDictionaryWithEnumTypes() cil managed { // Code size 38 (0x26) .maxstack 4 - .locals init (class [mscorlib]System.Collections.Generic.Dictionary`2 V_0) + .locals init (class [mscorlib]System.Collections.Generic.Dictionary`2 V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.0 IL_000e: ldc.i4.0 - IL_000f: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_000f: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_0014: nop IL_0015: ldloc.0 IL_0016: ldc.i4.1 IL_0017: ldc.i4.1 - IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_001d: nop IL_001e: ldloc.0 - IL_001f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0024: nop IL_0025: ret - } // end of method InitializerTests::CollectionInitializerDictionaryWithEnumTypes + } // end of method TestCases::CollectionInitializerDictionaryWithEnumTypes .method public hidebysig static void NotACollectionInitializer() cil managed { @@ -971,240 +1088,240 @@ IL_0018: ldc.i4.3 IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001e: nop - IL_001f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0024: ldloc.0 - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::NotACollectionInitializer + } // end of method TestCases::NotACollectionInitializer .method public hidebysig static void ObjectInitializer() cil managed { // Code size 28 (0x1c) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0013: nop IL_0014: ldloc.0 - IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001a: nop IL_001b: ret - } // end of method InitializerTests::ObjectInitializer + } // end of method TestCases::ObjectInitializer .method public hidebysig static void NotAnObjectInitializer() cil managed { // Code size 28 (0x1c) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.0 - IL_0009: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0009: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_000e: nop - IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0014: ldloc.0 - IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001a: nop IL_001b: ret - } // end of method InitializerTests::NotAnObjectInitializer + } // end of method TestCases::NotAnObjectInitializer .method public hidebysig static void NotAnObjectInitializerWithEvent() cil managed { // Code size 58 (0x3a) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate8' + IL_0008: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate8' IL_000d: brtrue.s IL_0022 IL_000f: ldnull - IL_0010: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'b__7'(object, - class [mscorlib]System.EventArgs) + IL_0010: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'b__7'(object, + class [mscorlib]System.EventArgs) IL_0016: newobj instance void [mscorlib]System.EventHandler::.ctor(object, native int) - IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate8' + IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate8' IL_0020: br.s IL_0022 - IL_0022: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate8' - IL_0027: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) + IL_0022: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate8' + IL_0027: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) IL_002c: nop - IL_002d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_002d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0032: ldloc.0 - IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0038: nop IL_0039: ret - } // end of method InitializerTests::NotAnObjectInitializerWithEvent + } // end of method TestCases::NotAnObjectInitializerWithEvent .method public hidebysig static void ObjectInitializerAssignCollectionToField() cil managed { // Code size 57 (0x39) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - class [mscorlib]System.Collections.Generic.List`1 V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + class [mscorlib]System.Collections.Generic.List`1 V_1) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0013: nop IL_0014: ldloc.0 - IL_0015: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0015: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_001a: stloc.1 IL_001b: ldloc.1 IL_001c: ldc.i4.0 - IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0022: nop IL_0023: ldloc.1 IL_0024: ldc.i4.1 - IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002a: nop IL_002b: ldloc.1 - IL_002c: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_002c: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0031: ldloc.0 - IL_0032: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0032: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0037: nop IL_0038: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToField + } // end of method TestCases::ObjectInitializerAssignCollectionToField .method public hidebysig static void ObjectInitializerAddToCollectionInField() cil managed { // Code size 54 (0x36) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0013: nop IL_0014: ldloc.0 - IL_0015: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0015: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_001a: ldc.i4.0 - IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: nop IL_0021: ldloc.0 - IL_0022: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0022: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0027: ldc.i4.1 - IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002d: nop IL_002e: ldloc.0 - IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0034: nop IL_0035: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInField + } // end of method TestCases::ObjectInitializerAddToCollectionInField .method public hidebysig static void ObjectInitializerAssignCollectionToProperty() cil managed { // Code size 58 (0x3a) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - class [mscorlib]System.Collections.Generic.List`1 V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + class [mscorlib]System.Collections.Generic.List`1 V_1) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0013: nop IL_0014: ldloc.0 - IL_0015: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0015: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_001a: stloc.1 IL_001b: ldloc.1 IL_001c: ldc.i4.0 - IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0022: nop IL_0023: ldloc.1 IL_0024: ldc.i4.1 - IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002a: nop IL_002b: ldloc.1 - IL_002c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + IL_002c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) IL_0031: nop IL_0032: ldloc.0 - IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0038: nop IL_0039: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToProperty + } // end of method TestCases::ObjectInitializerAssignCollectionToProperty .method public hidebysig static void ObjectInitializerAddToCollectionInProperty() cil managed { // Code size 54 (0x36) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0013: nop IL_0014: ldloc.0 - IL_0015: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0015: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_001a: ldc.i4.0 - IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: nop IL_0021: ldloc.0 - IL_0022: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0022: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0027: ldc.i4.1 - IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002d: nop IL_002e: ldloc.0 - IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0034: nop IL_0035: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInProperty + } // end of method TestCases::ObjectInitializerAddToCollectionInProperty .method public hidebysig static void ObjectInitializerWithInitializationOfNestedObjects() cil managed { // Code size 51 (0x33) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 - IL_000d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0012: ldc.i4.0 - IL_0013: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0013: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0018: nop IL_0019: ldloc.0 - IL_001a: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_001f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_001a: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_001f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0024: ldc.i4.1 - IL_0025: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0025: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_002a: nop IL_002b: ldloc.0 - IL_002c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0031: nop IL_0032: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfNestedObjects .method private hidebysig static int32 GetInt() cil managed @@ -1219,7 +1336,7 @@ IL_0005: ldloc.0 IL_0006: ret - } // end of method InitializerTests::GetInt + } // end of method TestCases::GetInt .method private hidebysig static string GetString() cil managed @@ -1234,7 +1351,7 @@ IL_0009: ldloc.0 IL_000a: ret - } // end of method InitializerTests::GetString + } // end of method TestCases::GetString .method private hidebysig static void NoOp(valuetype [mscorlib]System.Nullable`1[] 'array') cil managed { @@ -1242,245 +1359,245 @@ .maxstack 8 IL_0000: nop IL_0001: ret - } // end of method InitializerTests::NoOp + } // end of method TestCases::NoOp .method public hidebysig static void ObjectInitializerWithInitializationOfDeeplyNestedObjects() cil managed { // Code size 84 (0x54) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldc.i4.1 - IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0013: nop IL_0014: ldloc.0 - IL_0015: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0015: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_001a: ldc.i4.0 - IL_001b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_001b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0020: nop IL_0021: ldloc.0 - IL_0022: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0027: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_002c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0031: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0036: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_003b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0040: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0022: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0027: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_002c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0031: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0036: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_003b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0040: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0045: ldc.i4.1 - IL_0046: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0046: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_004b: nop IL_004c: ldloc.0 - IL_004d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_004d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0052: nop IL_0053: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfDeeplyNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfDeeplyNestedObjects .method public hidebysig static void CollectionInitializerInsideObjectInitializers() cil managed { // Code size 63 (0x3f) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_1) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 - IL_000d: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_000d: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0012: stloc.1 IL_0013: ldloc.1 IL_0014: ldc.i4.0 - IL_0015: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0015: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001a: nop IL_001b: ldloc.1 IL_001c: ldc.i4.1 - IL_001d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_001d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0022: nop IL_0023: ldloc.1 - IL_0024: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0024: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0029: ldc.i4.0 - IL_002a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_002a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002f: nop IL_0030: ldloc.1 - IL_0031: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_0031: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_0036: nop IL_0037: ldloc.0 - IL_0038: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0038: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_003d: nop IL_003e: ret - } // end of method InitializerTests::CollectionInitializerInsideObjectInitializers + } // end of method TestCases::CollectionInitializerInsideObjectInitializers .method public hidebysig static void NotAStructInitializer_DefaultConstructor() cil managed { // Code size 44 (0x2c) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop IL_0001: ldloca.s V_0 - IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0009: ldloca.s V_0 IL_000b: ldc.i4.1 - IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0011: ldloca.s V_0 IL_0013: ldc.i4.2 - IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0019: nop - IL_001a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001f: ldloc.0 - IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::NotAStructInitializer_DefaultConstructor + } // end of method TestCases::NotAStructInitializer_DefaultConstructor .method public hidebysig static void StructInitializer_DefaultConstructor() cil managed { // Code size 44 (0x2c) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: ldloca.s V_0 - IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000e: ldloca.s V_0 IL_0010: ldc.i4.1 - IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0016: ldloca.s V_0 IL_0018: ldc.i4.2 - IL_0019: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0019: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001e: nop IL_001f: ldloc.0 - IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::StructInitializer_DefaultConstructor + } // end of method TestCases::StructInitializer_DefaultConstructor .method public hidebysig static void NotAStructInitializer_ExplicitConstructor() cil managed { // Code size 45 (0x2d) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop IL_0001: ldloca.s V_0 IL_0003: ldc.i4.0 - IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0009: nop IL_000a: ldloca.s V_0 IL_000c: ldc.i4.1 - IL_000d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0012: ldloca.s V_0 IL_0014: ldc.i4.2 - IL_0015: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0015: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001a: nop - IL_001b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0020: ldloc.0 - IL_0021: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0026: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0021: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0026: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002b: nop IL_002c: ret - } // end of method InitializerTests::NotAStructInitializer_ExplicitConstructor + } // end of method TestCases::NotAStructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializer_ExplicitConstructor() cil managed { // Code size 45 (0x2d) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: ldloca.s V_0 IL_0008: ldc.i4.0 - IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_000e: nop IL_000f: ldloca.s V_0 IL_0011: ldc.i4.1 - IL_0012: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0012: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0017: ldloca.s V_0 IL_0019: ldc.i4.2 - IL_001a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_001a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001f: nop IL_0020: ldloc.0 - IL_0021: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0026: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0021: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0026: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002b: nop IL_002c: ret - } // end of method InitializerTests::StructInitializer_ExplicitConstructor + } // end of method TestCases::StructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializerWithInitializationOfNestedObjects() cil managed { // Code size 79 (0x4f) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: ldloca.s V_0 - IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000e: ldloca.s V_0 - IL_0010: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() + IL_0010: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() IL_0015: ldc.i4.0 - IL_0016: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0016: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001b: nop IL_001c: ldloca.s V_0 - IL_001e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0023: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_001e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0023: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0028: ldc.i4.0 - IL_0029: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0029: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002e: nop IL_002f: ldloca.s V_0 - IL_0031: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0036: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0031: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0036: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_003b: ldc.i4.1 - IL_003c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_003c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0041: nop IL_0042: ldloc.0 - IL_0043: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0048: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0043: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0048: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_004d: nop IL_004e: ret - } // end of method InitializerTests::StructInitializerWithInitializationOfNestedObjects + } // end of method TestCases::StructInitializerWithInitializationOfNestedObjects .method public hidebysig static void StructInitializerWithinObjectInitializer() cil managed { // Code size 54 (0x36) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_1) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: stloc.0 IL_000c: ldloc.0 IL_000d: ldloca.s V_1 IL_000f: ldc.i4.2 - IL_0010: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0010: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0015: nop IL_0016: ldloca.s V_1 IL_0018: ldc.i4.1 - IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_001e: ldloca.s V_1 IL_0020: ldc.i4.2 - IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0026: nop IL_0027: ldloc.1 - IL_0028: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) + IL_0028: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) IL_002d: nop IL_002e: ldloc.0 - IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0034: nop IL_0035: ret - } // end of method InitializerTests::StructInitializerWithinObjectInitializer + } // end of method TestCases::StructInitializerWithinObjectInitializer .method public hidebysig static void Bug270_NestedInitialisers() cil managed { @@ -1495,7 +1612,7 @@ IL_0002: stloc.0 IL_0003: ldc.i4.0 IL_0004: ldnull - IL_0005: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Bug270_NestedInitialisers() + IL_0005: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Bug270_NestedInitialisers() IL_000b: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object, native int) IL_0010: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) @@ -1520,17 +1637,17 @@ IL_003f: nop IL_0040: ldloc.2 IL_0041: ldloc.0 - IL_0042: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate1c' + IL_0042: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate1c' IL_0047: brtrue.s IL_005c IL_0049: ldnull - IL_004a: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'b__1b'(class [mscorlib]System.Globalization.NumberFormatInfo) + IL_004a: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'b__1b'(class [mscorlib]System.Globalization.NumberFormatInfo) IL_0050: newobj instance void class [mscorlib]System.Func`2::.ctor(object, native int) - IL_0055: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate1c' + IL_0055: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate1c' IL_005a: br.s IL_005c - IL_005c: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate1c' + IL_005c: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate1c' IL_0061: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [mscorlib]System.Func`2) IL_0066: call !!0 [System.Core]System.Linq.Enumerable::First(class [mscorlib]System.Collections.Generic.IEnumerable`1) @@ -1540,11 +1657,11 @@ IL_0072: callvirt instance void [mscorlib]System.Threading.Thread::set_CurrentCulture(class [mscorlib]System.Globalization.CultureInfo) IL_0077: nop IL_0078: ldloc.1 - IL_0079: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class [mscorlib]System.Threading.Thread) + IL_0079: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class [mscorlib]System.Threading.Thread) IL_007e: nop IL_007f: ret - } // end of method InitializerTests::Bug270_NestedInitialisers + } // end of method TestCases::Bug270_NestedInitialisers .method public hidebysig static void Bug953_MissingNullableSpecifierForArrayInitializer() cil managed { @@ -1562,10 +1679,10 @@ IL_0014: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) IL_0019: stobj valuetype [mscorlib]System.Nullable`1 IL_001e: ldloc.0 - IL_001f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::NoOp(valuetype [mscorlib]System.Nullable`1[]) + IL_001f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::NoOp(valuetype [mscorlib]System.Nullable`1[]) IL_0024: nop IL_0025: ret - } // end of method InitializerTests::Bug953_MissingNullableSpecifierForArrayInitializer + } // end of method TestCases::Bug953_MissingNullableSpecifierForArrayInitializer .method public hidebysig specialname rtspecialname instance void .ctor() cil managed @@ -1575,7 +1692,7 @@ IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } // end of method InitializerTests::.ctor + } // end of method TestCases::.ctor .method private hidebysig static void 'b__7'(object param0, class [mscorlib]System.EventArgs param1) cil managed @@ -1587,7 +1704,7 @@ IL_0001: call void [mscorlib]System.Console::WriteLine() IL_0006: nop IL_0007: ret - } // end of method InitializerTests::'b__7' + } // end of method TestCases::'b__7' .method private hidebysig static bool 'b__1b'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed { @@ -1605,9 +1722,9 @@ IL_0013: ldloc.0 IL_0014: ret - } // end of method InitializerTests::'b__1b' + } // end of method TestCases::'b__1b' -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases // ============================================================= diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il index 2afbef293..9cbd55a85 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il @@ -16,6 +16,7 @@ .assembly InitializerTests.opt { .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.ExtensionAttribute::.ctor() = ( 01 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. .permissionset reqmin @@ -34,15 +35,83 @@ // =============== CLASS MEMBERS DECLARATION =================== -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions extends [mscorlib]System.Object { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig static void Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 inst, + int32 a, + int32 b) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method Extensions::Add + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases + extends [mscorlib]System.Object +{ + .class auto ansi nested public beforefieldinit CustomList`1 + extends [mscorlib]System.Object + implements class [mscorlib]System.Collections.Generic.IEnumerable`1, + [mscorlib]System.Collections.IEnumerable + { + .method public hidebysig newslot virtual final + instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetEnumerator() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0005: throw + } // end of method CustomList`1::GetEnumerator + + .method private hidebysig newslot virtual final + instance class [mscorlib]System.Collections.IEnumerator + System.Collections.IEnumerable.GetEnumerator() cil managed + { + .override [mscorlib]System.Collections.IEnumerable::GetEnumerator + // Code size 6 (0x6) + .maxstack 8 + IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0005: throw + } // end of method CustomList`1::System.Collections.IEnumerable.GetEnumerator + + .method public hidebysig instance void + Add(string name) cil managed + { + // Code size 22 (0x16) + .maxstack 8 + IL_0000: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0005: ldarg.1 + IL_0006: ldtoken !!T2 + IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) + IL_0010: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) + IL_0015: ret + } // end of method CustomList`1::Add + + .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 CustomList`1::.ctor + + } // end of class CustomList`1 + .class auto ansi nested public beforefieldinit C extends [mscorlib]System.Object { .field public int32 Z - .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S Y - .field public class [mscorlib]System.Collections.Generic.List`1 L + .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S Y + .field public class [mscorlib]System.Collections.Generic.List`1 L .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { @@ -67,10 +136,10 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0007: ldarg.0 IL_0008: ldc.i4.0 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_000e: ret } // end of method S::.ctor @@ -80,156 +149,156 @@ extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum a = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum b = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b = int32(0x00000001) } // end of class MyEnum .class auto ansi sealed nested private MyEnum2 extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 c = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 d = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 c = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 d = int32(0x00000001) } // end of class MyEnum2 .class auto ansi nested private beforefieldinit Data extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. - .field public class [mscorlib]System.Collections.Generic.List`1 FieldList + .field public class [mscorlib]System.Collections.Generic.List`1 FieldList .field private class [mscorlib]System.EventHandler TestEvent - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' + .field private class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_a() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_a .method public hidebysig specialname - instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_a .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_b() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_b .method public hidebysig specialname - instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_b .method public hidebysig specialname - instance class [mscorlib]System.Collections.Generic.List`1 + instance class [mscorlib]System.Collections.Generic.List`1 get_PropertyList() 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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_PropertyList .method public hidebysig specialname - instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 'value') cil managed + instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 '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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_PropertyList .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() 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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_MoreData .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData get_NestedStruct() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_NestedStruct .method public hidebysig specialname - instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'value') cil managed + instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_NestedStruct .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i) cil managed { // Code size 2 (0x2) @@ -240,7 +309,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 1 (0x1) .maxstack 8 @@ -248,7 +317,7 @@ } // end of method Data::set_Item .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i, string j) cil managed { @@ -261,7 +330,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, string j, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 1 (0x1) .maxstack 8 @@ -277,7 +346,7 @@ class [mscorlib]System.EventHandler V_1, class [mscorlib]System.EventHandler V_2) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -288,7 +357,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -311,7 +380,7 @@ class [mscorlib]System.EventHandler V_1, class [mscorlib]System.EventHandler V_2) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -322,7 +391,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -342,8 +411,8 @@ // Code size 18 (0x12) .maxstack 8 IL_0000: ldarg.0 - IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_000b: ldarg.0 IL_000c: call instance void [mscorlib]System.Object::.ctor() IL_0011: ret @@ -351,55 +420,55 @@ .event [mscorlib]System.EventHandler TestEvent { - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::remove_TestEvent(class [mscorlib]System.EventHandler) - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::remove_TestEvent(class [mscorlib]System.EventHandler) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) } // end of event Data::TestEvent - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_a() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_a() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::a - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_b() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_b() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::b - .property instance class [mscorlib]System.Collections.Generic.List`1 + .property instance class [mscorlib]System.Collections.Generic.List`1 PropertyList() { - .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) } // end of property Data::PropertyList - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() } // end of property Data::MoreData - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData NestedStruct() { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_NestedStruct() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_NestedStruct() } // end of property Data::NestedStruct - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32) { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) } // end of property Data::Item - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32, string) { - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - string, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32, - string) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + string, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32, + string) } // end of property Data::Item } // end of class Data @@ -409,7 +478,7 @@ .field public int32 Field .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed @@ -418,7 +487,7 @@ // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: ret } // end of method StructData::get_Property @@ -430,31 +499,31 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_Property .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() 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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: ret } // end of method StructData::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_MoreData @@ -464,26 +533,26 @@ // Code size 22 (0x16) .maxstack 8 IL_0000: ldarg.0 - IL_0001: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0001: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0007: ldarg.0 IL_0008: ldarg.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_000e: ldarg.0 IL_000f: ldarg.1 - IL_0010: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0010: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0015: ret } // end of method StructData::.ctor .property instance int32 Property() { - .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_Property() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_Property() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) } // end of property StructData::Property - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property StructData::MoreData } // end of class StructData @@ -497,7 +566,7 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method InitializerTests::X + } // end of method TestCases::X .method private hidebysig static object Y() cil managed @@ -506,7 +575,7 @@ .maxstack 8 IL_0000: ldnull IL_0001: ret - } // end of method InitializerTests::Y + } // end of method TestCases::Y .method public hidebysig static void TestCall(int32 a, class [mscorlib]System.Threading.Thread thread) cil managed @@ -514,145 +583,145 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C TestCall(int32 a, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C c) cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C c) cil managed { // Code size 2 (0x2) .maxstack 8 IL_0000: ldarg.1 IL_0001: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1() cil managed { // Code size 36 (0x24) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 - IL_0007: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_000c: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0007: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_000c: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0011: ldloc.0 - IL_0012: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0012: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0017: ldc.i4.1 - IL_0018: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0018: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0022: ldloc.0 IL_0023: ret - } // end of method InitializerTests::Test1 + } // end of method TestCases::Test1 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1Alternative() cil managed { // Code size 39 (0x27) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class [mscorlib]System.Collections.Generic.List`1 V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class [mscorlib]System.Collections.Generic.List`1 V_1) IL_0000: ldc.i4.1 - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000d: stloc.1 IL_000e: ldloc.1 IL_000f: ldc.i4.1 - IL_0010: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_0015: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0010: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_0015: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001a: ldloc.1 - IL_001b: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_001b: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0020: ldloc.0 - IL_0021: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_0021: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_0026: ret - } // end of method InitializerTests::Test1Alternative + } // end of method TestCases::Test1Alternative - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test2() cil managed { // Code size 22 (0x16) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldc.i4.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000d: ldloc.0 IL_000e: ldc.i4.2 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_0014: ldloc.0 IL_0015: ret - } // end of method InitializerTests::Test2 + } // end of method TestCases::Test2 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3() cil managed { // Code size 32 (0x20) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldc.i4.1 - IL_0008: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_000d: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0008: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_000d: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0012: ldloc.0 - IL_0013: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0013: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0018: ldc.i4.2 - IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_001e: ldloc.0 IL_001f: ret - } // end of method InitializerTests::Test3 + } // end of method TestCases::Test3 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3b() cil managed { // Code size 33 (0x21) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) IL_0000: ldc.i4.0 - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000e: ldloc.0 - IL_000f: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_000f: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0014: ldc.i4.2 - IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_001a: ldloc.0 - IL_001b: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_001b: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_0020: ret - } // end of method InitializerTests::Test3b + } // end of method TestCases::Test3b - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test4() cil managed { // Code size 39 (0x27) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 - IL_0007: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0007: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_000c: ldc.i4.1 - IL_000d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_000d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0012: ldloc.0 IL_0013: ldc.i4.2 - IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_0019: ldloc.0 - IL_001a: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_001a: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_001f: ldc.i4.3 - IL_0020: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_0020: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_0025: ldloc.0 IL_0026: ret - } // end of method InitializerTests::Test4 + } // end of method TestCases::Test4 .method public hidebysig static void InvalidIndices(int32 a) cil managed { @@ -666,12 +735,12 @@ IL_0008: ldc.i4.1 IL_0009: ldarg.0 IL_000a: stelem.i4 - IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0010: ldloc.0 - IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0016: ret - } // end of method InitializerTests::InvalidIndices + } // end of method TestCases::InvalidIndices .method public hidebysig static void InvalidIndices2(int32 a) cil managed { @@ -685,12 +754,12 @@ IL_0008: ldc.i4.m1 IL_0009: ldarg.0 IL_000a: stelem.i4 - IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0010: ldloc.0 - IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0016: ret - } // end of method InitializerTests::InvalidIndices2 + } // end of method TestCases::InvalidIndices2 .method public hidebysig static void IndicesInWrongOrder(int32 a, int32 b) cil managed @@ -709,19 +778,52 @@ IL_000c: ldc.i4.1 IL_000d: ldarg.0 IL_000e: stelem.i4 - IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0014: ldloc.0 - IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001a: ret - } // end of method InitializerTests::IndicesInWrongOrder + } // end of method TestCases::IndicesInWrongOrder + + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 + ExtensionMethodInCollectionInitializer() cil managed + { + // Code size 16 (0x10) + .maxstack 3 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_0) + IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: ldc.i4.2 + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions::Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1, + int32, + int32) + IL_000e: ldloc.0 + IL_000f: ret + } // end of method TestCases::ExtensionMethodInCollectionInitializer + + .method public hidebysig static void NoCollectionInitializerBecauseOfTypeArguments() cil managed + { + // Code size 24 (0x18) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_0) + IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldstr "int" + IL_000c: callvirt instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::Add(string) + IL_0011: ldloc.0 + IL_0012: call void [mscorlib]System.Console::WriteLine(object) + IL_0017: ret + } // end of method TestCases::NoCollectionInitializerBecauseOfTypeArguments .method public hidebysig static void CollectionInitializerList() cil managed { // Code size 39 (0x27) .maxstack 3 .locals init (class [mscorlib]System.Collections.Generic.List`1 V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 @@ -734,10 +836,10 @@ IL_001a: ldc.i4.3 IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: ldloc.0 - IL_0021: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0021: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0026: ret - } // end of method InitializerTests::CollectionInitializerList + } // end of method TestCases::CollectionInitializerList .method public hidebysig static object RecursiveCollectionInitializer() cil managed @@ -752,14 +854,14 @@ IL_0008: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_000d: ldloc.0 IL_000e: ret - } // end of method InitializerTests::RecursiveCollectionInitializer + } // end of method TestCases::RecursiveCollectionInitializer .method public hidebysig static void CollectionInitializerDictionary() cil managed { // Code size 54 (0x36) .maxstack 4 .locals init (class [mscorlib]System.Collections.Generic.Dictionary`2 V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 @@ -778,34 +880,34 @@ IL_002a: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, !1) IL_002f: ldloc.0 - IL_0030: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0030: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0035: ret - } // end of method InitializerTests::CollectionInitializerDictionary + } // end of method TestCases::CollectionInitializerDictionary .method public hidebysig static void CollectionInitializerDictionaryWithEnumTypes() cil managed { // Code size 34 (0x22) .maxstack 4 - .locals init (class [mscorlib]System.Collections.Generic.Dictionary`2 V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + .locals init (class [mscorlib]System.Collections.Generic.Dictionary`2 V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_000e: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_0013: ldloc.0 IL_0014: ldc.i4.1 IL_0015: ldc.i4.1 - IL_0016: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_0016: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_001b: ldloc.0 - IL_001c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0021: ret - } // end of method InitializerTests::CollectionInitializerDictionaryWithEnumTypes + } // end of method TestCases::CollectionInitializerDictionaryWithEnumTypes .method public hidebysig static void NotACollectionInitializer() cil managed { @@ -823,203 +925,203 @@ IL_0014: ldloc.0 IL_0015: ldc.i4.3 IL_0016: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_001b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0020: ldloc.0 - IL_0021: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0021: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0026: ret - } // end of method InitializerTests::NotACollectionInitializer + } // end of method TestCases::NotACollectionInitializer .method public hidebysig static void ObjectInitializer() cil managed { // Code size 25 (0x19) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: ldloc.0 - IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0018: ret - } // end of method InitializerTests::ObjectInitializer + } // end of method TestCases::ObjectInitializer .method public hidebysig static void NotAnObjectInitializer() cil managed { // Code size 25 (0x19) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldc.i4.0 - IL_0008: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) - IL_000d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0008: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) + IL_000d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0012: ldloc.0 - IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0018: ret - } // end of method InitializerTests::NotAnObjectInitializer + } // end of method TestCases::NotAnObjectInitializer .method public hidebysig static void NotAnObjectInitializerWithEvent() cil managed { // Code size 53 (0x35) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 - IL_0007: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate8' + IL_0007: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate8' IL_000c: brtrue.s IL_001f IL_000e: ldnull - IL_000f: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'b__7'(object, - class [mscorlib]System.EventArgs) + IL_000f: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'b__7'(object, + class [mscorlib]System.EventArgs) IL_0015: newobj instance void [mscorlib]System.EventHandler::.ctor(object, native int) - IL_001a: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate8' - IL_001f: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate8' - IL_0024: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) - IL_0029: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001a: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate8' + IL_001f: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate8' + IL_0024: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) + IL_0029: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_002e: ldloc.0 - IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0034: ret - } // end of method InitializerTests::NotAnObjectInitializerWithEvent + } // end of method TestCases::NotAnObjectInitializerWithEvent .method public hidebysig static void ObjectInitializerAssignCollectionToField() cil managed { // Code size 52 (0x34) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - class [mscorlib]System.Collections.Generic.List`1 V_1) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + class [mscorlib]System.Collections.Generic.List`1 V_1) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: ldloc.0 - IL_0013: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0013: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_0018: stloc.1 IL_0019: ldloc.1 IL_001a: ldc.i4.0 - IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: ldloc.1 IL_0021: ldc.i4.1 - IL_0022: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0022: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0027: ldloc.1 - IL_0028: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0028: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_002d: ldloc.0 - IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0033: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToField + } // end of method TestCases::ObjectInitializerAssignCollectionToField .method public hidebysig static void ObjectInitializerAddToCollectionInField() cil managed { // Code size 49 (0x31) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: ldloc.0 - IL_0013: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0013: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0018: ldc.i4.0 - IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001e: ldloc.0 - IL_001f: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_001f: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0024: ldc.i4.1 - IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002a: ldloc.0 - IL_002b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0030: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInField + } // end of method TestCases::ObjectInitializerAddToCollectionInField .method public hidebysig static void ObjectInitializerAssignCollectionToProperty() cil managed { // Code size 52 (0x34) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - class [mscorlib]System.Collections.Generic.List`1 V_1) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + class [mscorlib]System.Collections.Generic.List`1 V_1) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: ldloc.0 - IL_0013: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0013: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_0018: stloc.1 IL_0019: ldloc.1 IL_001a: ldc.i4.0 - IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: ldloc.1 IL_0021: ldc.i4.1 - IL_0022: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0022: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0027: ldloc.1 - IL_0028: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + IL_0028: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) IL_002d: ldloc.0 - IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0033: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToProperty + } // end of method TestCases::ObjectInitializerAssignCollectionToProperty .method public hidebysig static void ObjectInitializerAddToCollectionInProperty() cil managed { // Code size 49 (0x31) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: ldloc.0 - IL_0013: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0013: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0018: ldc.i4.0 - IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001e: ldloc.0 - IL_001f: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_001f: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0024: ldc.i4.1 - IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002a: ldloc.0 - IL_002b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0030: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInProperty + } // end of method TestCases::ObjectInitializerAddToCollectionInProperty .method public hidebysig static void ObjectInitializerWithInitializationOfNestedObjects() cil managed { // Code size 47 (0x2f) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 - IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0011: ldc.i4.0 - IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0017: ldloc.0 - IL_0018: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_001d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0018: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_001d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0022: ldc.i4.1 - IL_0023: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0023: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0028: ldloc.0 - IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002e: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfNestedObjects .method private hidebysig static int32 GetInt() cil managed @@ -1028,7 +1130,7 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: ret - } // end of method InitializerTests::GetInt + } // end of method TestCases::GetInt .method private hidebysig static string GetString() cil managed @@ -1037,217 +1139,217 @@ .maxstack 8 IL_0000: ldstr "Test" IL_0005: ret - } // end of method InitializerTests::GetString + } // end of method TestCases::GetString .method private hidebysig static void NoOp(valuetype [mscorlib]System.Nullable`1[] 'array') cil managed { // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method InitializerTests::NoOp + } // end of method TestCases::NoOp .method public hidebysig static void ObjectInitializerWithInitializationOfDeeplyNestedObjects() cil managed { // Code size 79 (0x4f) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldc.i4.1 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: ldloc.0 - IL_0013: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0013: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0018: ldc.i4.0 - IL_0019: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0019: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001e: ldloc.0 - IL_001f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0024: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0029: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_002e: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0033: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0038: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_003d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_001f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0024: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0029: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_002e: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0033: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0038: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_003d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0042: ldc.i4.1 - IL_0043: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0043: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0048: ldloc.0 - IL_0049: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0049: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_004e: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfDeeplyNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfDeeplyNestedObjects .method public hidebysig static void CollectionInitializerInsideObjectInitializers() cil managed { // Code size 57 (0x39) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_1) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_1) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 - IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0011: stloc.1 IL_0012: ldloc.1 IL_0013: ldc.i4.0 - IL_0014: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0014: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0019: ldloc.1 IL_001a: ldc.i4.1 - IL_001b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_001b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0020: ldloc.1 - IL_0021: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0021: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0026: ldc.i4.0 - IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002c: ldloc.1 - IL_002d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_002d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_0032: ldloc.0 - IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0038: ret - } // end of method InitializerTests::CollectionInitializerInsideObjectInitializers + } // end of method TestCases::CollectionInitializerInsideObjectInitializers .method public hidebysig static void NotAStructInitializer_DefaultConstructor() cil managed { // Code size 41 (0x29) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: ldloca.s V_0 - IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0008: ldloca.s V_0 IL_000a: ldc.i4.1 - IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0010: ldloca.s V_0 IL_0012: ldc.i4.2 - IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) - IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) + IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::NotAStructInitializer_DefaultConstructor + } // end of method TestCases::NotAStructInitializer_DefaultConstructor .method public hidebysig static void StructInitializer_DefaultConstructor() cil managed { // Code size 41 (0x29) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: ldloca.s V_0 - IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000d: ldloca.s V_0 IL_000f: ldc.i4.1 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0015: ldloca.s V_0 IL_0017: ldc.i4.2 - IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::StructInitializer_DefaultConstructor + } // end of method TestCases::StructInitializer_DefaultConstructor .method public hidebysig static void NotAStructInitializer_ExplicitConstructor() cil managed { // Code size 41 (0x29) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: ldloca.s V_0 IL_0002: ldc.i4.0 - IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0008: ldloca.s V_0 IL_000a: ldc.i4.1 - IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0010: ldloca.s V_0 IL_0012: ldc.i4.2 - IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) - IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) + IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::NotAStructInitializer_ExplicitConstructor + } // end of method TestCases::NotAStructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializer_ExplicitConstructor() cil managed { // Code size 41 (0x29) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: ldloca.s V_0 IL_0007: ldc.i4.0 - IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_000d: ldloca.s V_0 IL_000f: ldc.i4.1 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0015: ldloca.s V_0 IL_0017: ldc.i4.2 - IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::StructInitializer_ExplicitConstructor + } // end of method TestCases::StructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializerWithInitializationOfNestedObjects() cil managed { // Code size 74 (0x4a) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: ldloca.s V_0 - IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000d: ldloca.s V_0 - IL_000f: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() + IL_000f: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() IL_0014: ldc.i4.0 - IL_0015: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0015: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001a: ldloca.s V_0 - IL_001c: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0021: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_001c: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0021: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0026: ldc.i4.0 - IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002c: ldloca.s V_0 - IL_002e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0033: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_002e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0033: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0038: ldc.i4.1 - IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_003e: ldloc.0 - IL_003f: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0044: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_003f: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0044: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0049: ret - } // end of method InitializerTests::StructInitializerWithInitializationOfNestedObjects + } // end of method TestCases::StructInitializerWithInitializationOfNestedObjects .method public hidebysig static void StructInitializerWithinObjectInitializer() cil managed { // Code size 49 (0x31) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0, - valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_1) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0, + valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_1) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: stloc.0 IL_000b: ldloc.0 IL_000c: ldloca.s V_1 IL_000e: ldc.i4.2 - IL_000f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_000f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0014: ldloca.s V_1 IL_0016: ldc.i4.1 - IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_001c: ldloca.s V_1 IL_001e: ldc.i4.2 - IL_001f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_001f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0024: ldloc.1 - IL_0025: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) + IL_0025: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) IL_002a: ldloc.0 - IL_002b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0030: ret - } // end of method InitializerTests::StructInitializerWithinObjectInitializer + } // end of method TestCases::StructInitializerWithinObjectInitializer .method public hidebysig static void Bug270_NestedInitialisers() cil managed { @@ -1261,7 +1363,7 @@ IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: ldnull - IL_0004: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Bug270_NestedInitialisers() + IL_0004: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Bug270_NestedInitialisers() IL_000a: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object, native int) IL_000f: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) @@ -1283,15 +1385,15 @@ IL_0037: callvirt instance void [mscorlib]System.Globalization.CultureInfo::set_DateTimeFormat(class [mscorlib]System.Globalization.DateTimeFormatInfo) IL_003c: ldloc.2 IL_003d: ldloc.0 - IL_003e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate1c' + IL_003e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate1c' IL_0043: brtrue.s IL_0056 IL_0045: ldnull - IL_0046: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'b__1b'(class [mscorlib]System.Globalization.NumberFormatInfo) + IL_0046: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'b__1b'(class [mscorlib]System.Globalization.NumberFormatInfo) IL_004c: newobj instance void class [mscorlib]System.Func`2::.ctor(object, native int) - IL_0051: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate1c' - IL_0056: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::'CS$<>9__CachedAnonymousMethodDelegate1c' + IL_0051: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate1c' + IL_0056: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::'CS$<>9__CachedAnonymousMethodDelegate1c' IL_005b: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [mscorlib]System.Func`2) IL_0060: call !!0 [System.Core]System.Linq.Enumerable::First(class [mscorlib]System.Collections.Generic.IEnumerable`1) @@ -1299,10 +1401,10 @@ IL_006a: ldloc.2 IL_006b: callvirt instance void [mscorlib]System.Threading.Thread::set_CurrentCulture(class [mscorlib]System.Globalization.CultureInfo) IL_0070: ldloc.1 - IL_0071: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class [mscorlib]System.Threading.Thread) + IL_0071: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class [mscorlib]System.Threading.Thread) IL_0076: ret - } // end of method InitializerTests::Bug270_NestedInitialisers + } // end of method TestCases::Bug270_NestedInitialisers .method public hidebysig static void Bug953_MissingNullableSpecifierForArrayInitializer() cil managed { @@ -1319,9 +1421,9 @@ IL_0013: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) IL_0018: stobj valuetype [mscorlib]System.Nullable`1 IL_001d: ldloc.0 - IL_001e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::NoOp(valuetype [mscorlib]System.Nullable`1[]) + IL_001e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::NoOp(valuetype [mscorlib]System.Nullable`1[]) IL_0023: ret - } // end of method InitializerTests::Bug953_MissingNullableSpecifierForArrayInitializer + } // end of method TestCases::Bug953_MissingNullableSpecifierForArrayInitializer .method public hidebysig specialname rtspecialname instance void .ctor() cil managed @@ -1331,7 +1433,7 @@ IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } // end of method InitializerTests::.ctor + } // end of method TestCases::.ctor .method private hidebysig static void 'b__7'(object param0, class [mscorlib]System.EventArgs param1) cil managed @@ -1341,7 +1443,7 @@ .maxstack 8 IL_0000: call void [mscorlib]System.Console::WriteLine() IL_0005: ret - } // end of method InitializerTests::'b__7' + } // end of method TestCases::'b__7' .method private hidebysig static bool 'b__1b'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed { @@ -1354,9 +1456,9 @@ IL_000b: call bool [mscorlib]System.String::op_Equality(string, string) IL_0010: ret - } // end of method InitializerTests::'b__1b' + } // end of method TestCases::'b__1b' -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases // ============================================================= diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.roslyn.il index 6cde62c4a..1c0a02f42 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.roslyn.il @@ -15,6 +15,7 @@ } .assembly InitializerTests { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .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. @@ -38,15 +39,83 @@ // =============== CLASS MEMBERS DECLARATION =================== -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions extends [mscorlib]System.Object { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig static void Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 inst, + int32 a, + int32 b) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method Extensions::Add + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases + extends [mscorlib]System.Object +{ + .class auto ansi nested public beforefieldinit CustomList`1 + extends [mscorlib]System.Object + implements class [mscorlib]System.Collections.Generic.IEnumerable`1, + [mscorlib]System.Collections.IEnumerable + { + .method public hidebysig newslot virtual final + instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetEnumerator() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0005: throw + } // end of method CustomList`1::GetEnumerator + + .method private hidebysig newslot virtual final + instance class [mscorlib]System.Collections.IEnumerator + System.Collections.IEnumerable.GetEnumerator() cil managed + { + .override [mscorlib]System.Collections.IEnumerable::GetEnumerator + // Code size 6 (0x6) + .maxstack 8 + IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0005: throw + } // end of method CustomList`1::System.Collections.IEnumerable.GetEnumerator + + .method public hidebysig instance void + Add(string name) cil managed + { + // Code size 22 (0x16) + .maxstack 8 + IL_0000: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0005: ldarg.1 + IL_0006: ldtoken !!T2 + IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) + IL_0010: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) + IL_0015: ret + } // end of method CustomList`1::Add + + .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 CustomList`1::.ctor + + } // end of class CustomList`1 + .class auto ansi nested public beforefieldinit C extends [mscorlib]System.Object { .field public int32 Z - .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S Y - .field public class [mscorlib]System.Collections.Generic.List`1 L + .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S Y + .field public class [mscorlib]System.Collections.Generic.List`1 L .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { @@ -71,10 +140,10 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0007: ldarg.0 IL_0008: ldc.i4.0 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_000e: ret } // end of method S::.ctor @@ -84,157 +153,157 @@ extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum a = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum b = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b = int32(0x00000001) } // end of class MyEnum .class auto ansi sealed nested private MyEnum2 extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 c = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 d = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 c = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 d = int32(0x00000001) } // end of class MyEnum2 .class auto ansi nested private beforefieldinit Data extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. - .field public class [mscorlib]System.Collections.Generic.List`1 FieldList - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field public class [mscorlib]System.Collections.Generic.List`1 FieldList + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' + .field private class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private class [mscorlib]System.EventHandler TestEvent .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_a() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_a .method public hidebysig specialname - instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_a .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_b() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_b .method public hidebysig specialname - instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_b .method public hidebysig specialname - instance class [mscorlib]System.Collections.Generic.List`1 + instance class [mscorlib]System.Collections.Generic.List`1 get_PropertyList() 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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_PropertyList .method public hidebysig specialname - instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 'value') cil managed + instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 '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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_PropertyList .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() 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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_MoreData .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData get_NestedStruct() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_NestedStruct .method public hidebysig specialname - instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'value') cil managed + instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_NestedStruct .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i) cil managed { // Code size 2 (0x2) @@ -245,7 +314,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 1 (0x1) .maxstack 8 @@ -253,7 +322,7 @@ } // end of method Data::set_Item .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i, string j) cil managed { @@ -266,7 +335,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, string j, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 1 (0x1) .maxstack 8 @@ -283,7 +352,7 @@ class [mscorlib]System.EventHandler V_1, class [mscorlib]System.EventHandler V_2) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -294,7 +363,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -318,7 +387,7 @@ class [mscorlib]System.EventHandler V_1, class [mscorlib]System.EventHandler V_2) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -329,7 +398,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -349,8 +418,8 @@ // Code size 18 (0x12) .maxstack 8 IL_0000: ldarg.0 - IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_000b: ldarg.0 IL_000c: call instance void [mscorlib]System.Object::.ctor() IL_0011: ret @@ -358,55 +427,55 @@ .event [mscorlib]System.EventHandler TestEvent { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::remove_TestEvent(class [mscorlib]System.EventHandler) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::remove_TestEvent(class [mscorlib]System.EventHandler) } // end of event Data::TestEvent - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_a() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_a() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::a - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_b() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_b() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::b - .property instance class [mscorlib]System.Collections.Generic.List`1 + .property instance class [mscorlib]System.Collections.Generic.List`1 PropertyList() { - .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) } // end of property Data::PropertyList - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property Data::MoreData - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData NestedStruct() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_NestedStruct() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_NestedStruct() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) } // end of property Data::NestedStruct - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32) { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property Data::Item - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32, string) { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32, - string) - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - string, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32, + string) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + string, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property Data::Item } // end of class Data @@ -416,7 +485,7 @@ .field public int32 Field .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed @@ -425,7 +494,7 @@ // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: ret } // end of method StructData::get_Property @@ -437,31 +506,31 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_Property .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() 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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: ret } // end of method StructData::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_MoreData @@ -471,26 +540,26 @@ // Code size 22 (0x16) .maxstack 8 IL_0000: ldarg.0 - IL_0001: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0001: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0007: ldarg.0 IL_0008: ldarg.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_000e: ldarg.0 IL_000f: ldarg.1 - IL_0010: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0010: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0015: ret } // end of method StructData::.ctor .property instance int32 Property() { - .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_Property() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_Property() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) } // end of property StructData::Property - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property StructData::MoreData } // end of class StructData @@ -498,16 +567,16 @@ extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' '<>9' - .field public static class [mscorlib]System.EventHandler '<>9__26_0' - .field public static class [mscorlib]System.Func`2 '<>9__46_0' + .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' '<>9' + .field public static class [mscorlib]System.EventHandler '<>9__29_0' + .field public static class [mscorlib]System.Func`2 '<>9__49_0' .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::.ctor() - IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9' + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::.ctor() + IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9' IL_000a: ret } // end of method '<>c'::.cctor @@ -522,17 +591,17 @@ } // end of method '<>c'::.ctor .method assembly hidebysig instance void - 'b__26_0'(object '', + 'b__29_0'(object '', class [mscorlib]System.EventArgs '') cil managed { // Code size 6 (0x6) .maxstack 8 IL_0000: call void [mscorlib]System.Console::WriteLine() IL_0005: ret - } // end of method '<>c'::'b__26_0' + } // end of method '<>c'::'b__29_0' .method assembly hidebysig instance bool - 'b__46_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed + 'b__49_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed { // Code size 17 (0x11) .maxstack 8 @@ -542,7 +611,7 @@ IL_000b: call bool [mscorlib]System.String::op_Equality(string, string) IL_0010: ret - } // end of method '<>c'::'b__46_0' + } // end of method '<>c'::'b__49_0' } // end of class '<>c' @@ -552,7 +621,7 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method InitializerTests::X + } // end of method TestCases::X .method private hidebysig static object Y() cil managed @@ -561,7 +630,7 @@ .maxstack 8 IL_0000: ldnull IL_0001: ret - } // end of method InitializerTests::Y + } // end of method TestCases::Y .method public hidebysig static void TestCall(int32 a, class [mscorlib]System.Threading.Thread thread) cil managed @@ -569,124 +638,124 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C TestCall(int32 a, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C c) cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C c) cil managed { // Code size 2 (0x2) .maxstack 8 IL_0000: ldarg.1 IL_0001: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1() cil managed { // Code size 34 (0x22) .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: dup - IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_000b: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_000b: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0010: dup - IL_0011: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0011: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0016: ldc.i4.1 - IL_0017: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_001c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0017: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_001c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0021: ret - } // end of method InitializerTests::Test1 + } // end of method TestCases::Test1 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1Alternative() cil managed { // Code size 35 (0x23) .maxstack 8 IL_0000: ldc.i4.1 - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: dup - IL_0007: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0007: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000c: dup IL_000d: ldc.i4.1 - IL_000e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_0013: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_0018: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L - IL_001d: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_000e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_0013: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0018: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L + IL_001d: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_0022: ret - } // end of method InitializerTests::Test1Alternative + } // end of method TestCases::Test1Alternative - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test2() cil managed { // Code size 20 (0x14) .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: dup IL_0006: ldc.i4.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000c: dup IL_000d: ldc.i4.2 - IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_0013: ret - } // end of method InitializerTests::Test2 + } // end of method TestCases::Test2 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3() cil managed { // Code size 30 (0x1e) .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: dup IL_0006: ldc.i4.1 - IL_0007: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_000c: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0007: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_000c: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0011: dup - IL_0012: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0012: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0017: ldc.i4.2 - IL_0018: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0018: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_001d: ret - } // end of method InitializerTests::Test3 + } // end of method TestCases::Test3 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3b() cil managed { // Code size 31 (0x1f) .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: dup IL_0007: ldc.i4.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000d: dup - IL_000e: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_000e: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0013: ldc.i4.2 - IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A - IL_0019: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A + IL_0019: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_001e: ret - } // end of method InitializerTests::Test3b + } // end of method TestCases::Test3b - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test4() cil managed { // Code size 37 (0x25) .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0005: dup - IL_0006: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0006: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_000b: ldc.i4.1 - IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0011: dup IL_0012: ldc.i4.2 - IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_0018: dup - IL_0019: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0019: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_001e: ldc.i4.3 - IL_001f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_001f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_0024: ret - } // end of method InitializerTests::Test4 + } // end of method TestCases::Test4 .method public hidebysig static void InvalidIndices(int32 a) cil managed { @@ -700,12 +769,12 @@ IL_0008: ldc.i4.1 IL_0009: ldarg.0 IL_000a: stelem.i4 - IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0010: ldloc.0 - IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0016: ret - } // end of method InitializerTests::InvalidIndices + } // end of method TestCases::InvalidIndices .method public hidebysig static void InvalidIndices2(int32 a) cil managed { @@ -719,12 +788,12 @@ IL_0008: ldc.i4.m1 IL_0009: ldarg.0 IL_000a: stelem.i4 - IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0010: ldloc.0 - IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0016: ret - } // end of method InitializerTests::InvalidIndices2 + } // end of method TestCases::InvalidIndices2 .method public hidebysig static void IndicesInWrongOrder(int32 a, int32 b) cil managed @@ -743,18 +812,45 @@ IL_000c: ldc.i4.1 IL_000d: ldarg.0 IL_000e: stelem.i4 - IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0014: ldloc.0 - IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001a: ret - } // end of method InitializerTests::IndicesInWrongOrder + } // end of method TestCases::IndicesInWrongOrder + + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 + ExtensionMethodInCollectionInitializer() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: ldc.i4.2 + IL_0008: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions::Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1, + int32, + int32) + IL_000d: ret + } // end of method TestCases::ExtensionMethodInCollectionInitializer + + .method public hidebysig static void NoCollectionInitializerBecauseOfTypeArguments() cil managed + { + // Code size 22 (0x16) + .maxstack 8 + IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0005: dup + IL_0006: ldstr "int" + IL_000b: callvirt instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::Add(string) + IL_0010: call void [mscorlib]System.Console::WriteLine(object) + IL_0015: ret + } // end of method TestCases::NoCollectionInitializerBecauseOfTypeArguments .method public hidebysig static void CollectionInitializerList() cil managed { // Code size 37 (0x25) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000a: dup IL_000b: ldc.i4.1 @@ -765,10 +861,10 @@ IL_0018: dup IL_0019: ldc.i4.3 IL_001a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_001f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0024: ret - } // end of method InitializerTests::CollectionInitializerList + } // end of method TestCases::CollectionInitializerList .method public hidebysig static object RecursiveCollectionInitializer() cil managed @@ -780,13 +876,13 @@ IL_0006: dup IL_0007: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_000c: ret - } // end of method InitializerTests::RecursiveCollectionInitializer + } // end of method TestCases::RecursiveCollectionInitializer .method public hidebysig static void CollectionInitializerDictionary() cil managed { // Code size 52 (0x34) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000a: dup IL_000b: ldstr "First" @@ -803,31 +899,31 @@ IL_0028: ldc.i4.3 IL_0029: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, !1) - IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0033: ret - } // end of method InitializerTests::CollectionInitializerDictionary + } // end of method TestCases::CollectionInitializerDictionary .method public hidebysig static void CollectionInitializerDictionaryWithEnumTypes() cil managed { // Code size 32 (0x20) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000a: dup IL_000b: ldc.i4.0 IL_000c: ldc.i4.0 - IL_000d: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_000d: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_0012: dup IL_0013: ldc.i4.1 IL_0014: ldc.i4.1 - IL_0015: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) - IL_001a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0015: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) + IL_001a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001f: ret - } // end of method InitializerTests::CollectionInitializerDictionaryWithEnumTypes + } // end of method TestCases::CollectionInitializerDictionaryWithEnumTypes .method public hidebysig static void NotACollectionInitializer() cil managed { @@ -845,181 +941,181 @@ IL_0014: ldloc.0 IL_0015: ldc.i4.3 IL_0016: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_001b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0020: ldloc.0 - IL_0021: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0021: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0026: ret - } // end of method InitializerTests::NotACollectionInitializer + } // end of method TestCases::NotACollectionInitializer .method public hidebysig static void ObjectInitializer() cil managed { // Code size 23 (0x17) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldc.i4.0 - IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) - IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) + IL_0011: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0016: ret - } // end of method InitializerTests::ObjectInitializer + } // end of method TestCases::ObjectInitializer .method public hidebysig static void NotAnObjectInitializer() cil managed { // Code size 25 (0x19) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldc.i4.0 - IL_0008: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) - IL_000d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0008: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) + IL_000d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0012: ldloc.0 - IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0018: ret - } // end of method InitializerTests::NotAnObjectInitializer + } // end of method TestCases::NotAnObjectInitializer .method public hidebysig static void NotAnObjectInitializerWithEvent() cil managed { // Code size 55 (0x37) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 - IL_0007: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__26_0' + IL_0007: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__29_0' IL_000c: dup IL_000d: brtrue.s IL_0026 IL_000f: pop - IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9' - IL_0015: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'b__26_0'(object, - class [mscorlib]System.EventArgs) + IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9' + IL_0015: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'b__29_0'(object, + class [mscorlib]System.EventArgs) IL_001b: newobj instance void [mscorlib]System.EventHandler::.ctor(object, native int) IL_0020: dup - IL_0021: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__26_0' - IL_0026: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) - IL_002b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0021: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__29_0' + IL_0026: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) + IL_002b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0030: ldloc.0 - IL_0031: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0031: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0036: ret - } // end of method InitializerTests::NotAnObjectInitializerWithEvent + } // end of method TestCases::NotAnObjectInitializerWithEvent .method public hidebysig static void ObjectInitializerAssignCollectionToField() cil managed { // Code size 48 (0x30) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldc.i4.0 - IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0011: dup - IL_0012: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0012: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_0017: dup IL_0018: ldc.i4.0 - IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001e: dup IL_001f: ldc.i4.1 - IL_0020: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_0025: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList - IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0025: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList + IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002f: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToField + } // end of method TestCases::ObjectInitializerAssignCollectionToField .method public hidebysig static void ObjectInitializerAddToCollectionInField() cil managed { // Code size 47 (0x2f) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldc.i4.0 - IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0011: dup - IL_0012: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0012: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0017: ldc.i4.0 - IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001d: dup - IL_001e: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_001e: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0023: ldc.i4.1 - IL_0024: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0024: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002e: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInField + } // end of method TestCases::ObjectInitializerAddToCollectionInField .method public hidebysig static void ObjectInitializerAssignCollectionToProperty() cil managed { // Code size 48 (0x30) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldc.i4.0 - IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0011: dup - IL_0012: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0012: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_0017: dup IL_0018: ldc.i4.0 - IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001e: dup IL_001f: ldc.i4.1 - IL_0020: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_0025: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) - IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0025: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002f: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToProperty + } // end of method TestCases::ObjectInitializerAssignCollectionToProperty .method public hidebysig static void ObjectInitializerAddToCollectionInProperty() cil managed { // Code size 47 (0x2f) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldc.i4.0 - IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0011: dup - IL_0012: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0012: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0017: ldc.i4.0 - IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001d: dup - IL_001e: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_001e: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0023: ldc.i4.1 - IL_0024: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0024: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002e: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInProperty + } // end of method TestCases::ObjectInitializerAddToCollectionInProperty .method public hidebysig static void ObjectInitializerWithInitializationOfNestedObjects() cil managed { // Code size 45 (0x2d) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup - IL_000b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0010: ldc.i4.0 - IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0016: dup - IL_0017: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_001c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0017: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_001c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0021: ldc.i4.1 - IL_0022: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) - IL_0027: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0022: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) + IL_0027: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002c: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfNestedObjects .method private hidebysig static int32 GetInt() cil managed @@ -1028,7 +1124,7 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: ret - } // end of method InitializerTests::GetInt + } // end of method TestCases::GetInt .method private hidebysig static string GetString() cil managed @@ -1037,35 +1133,35 @@ .maxstack 8 IL_0000: ldstr "Test" IL_0005: ret - } // end of method InitializerTests::GetString + } // end of method TestCases::GetString .method private hidebysig static void NoOp(valuetype [mscorlib]System.Nullable`1[] 'array') cil managed { // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method InitializerTests::NoOp + } // end of method TestCases::NoOp .method public hidebysig static void SimpleDictInitializer() cil managed { // Code size 41 (0x29) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup - IL_000b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0010: ldc.i4.0 - IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0016: dup - IL_0017: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0017: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_001c: ldc.i4.2 IL_001d: ldnull - IL_001e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::SimpleDictInitializer + } // end of method TestCases::SimpleDictInitializer .method public hidebysig static void MixedObjectAndDictInitializer() cil managed { @@ -1074,53 +1170,53 @@ .locals init (int32 V_0, int32 V_1, string V_2) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup - IL_000b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0010: ldc.i4.0 - IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) - IL_0016: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::GetInt() + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) + IL_0016: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::GetInt() IL_001b: stloc.0 IL_001c: dup - IL_001d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_001d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0022: ldloc.0 - IL_0023: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + IL_0023: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) IL_0028: ldc.i4.1 - IL_0029: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0029: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_002e: dup - IL_002f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_002f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0034: ldloc.0 - IL_0035: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) - IL_003a: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0035: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) + IL_003a: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_003f: ldc.i4.0 - IL_0040: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_0045: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::GetInt() + IL_0040: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0045: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::GetInt() IL_004a: stloc.1 - IL_004b: call string ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::GetString() + IL_004b: call string ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::GetString() IL_0050: stloc.2 IL_0051: dup - IL_0052: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0052: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0057: ldloc.0 - IL_0058: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + IL_0058: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) IL_005d: ldloc.1 IL_005e: ldloc.2 - IL_005f: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() - IL_0064: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - string, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_005f: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() + IL_0064: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + string, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_0069: dup - IL_006a: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_006a: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_006f: ldloc.0 - IL_0070: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + IL_0070: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) IL_0075: ldc.i4.2 IL_0076: ldnull - IL_0077: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - IL_007c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0077: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + IL_007c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0081: ret - } // end of method InitializerTests::MixedObjectAndDictInitializer + } // end of method TestCases::MixedObjectAndDictInitializer .method public hidebysig instance void NestedListWithIndexInitializer() cil managed @@ -1145,198 +1241,198 @@ IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002c: pop IL_002d: ret - } // end of method InitializerTests::NestedListWithIndexInitializer + } // end of method TestCases::NestedListWithIndexInitializer .method public hidebysig static void ObjectInitializerWithInitializationOfDeeplyNestedObjects() cil managed { // Code size 77 (0x4d) .maxstack 4 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldc.i4.1 - IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0011: dup - IL_0012: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0012: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0017: ldc.i4.0 - IL_0018: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0018: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001d: dup - IL_001e: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0023: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0028: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_002d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0032: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0037: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_003c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_001e: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0023: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0028: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_002d: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0032: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0037: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_003c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0041: ldc.i4.1 - IL_0042: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) - IL_0047: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0042: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) + IL_0047: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_004c: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfDeeplyNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfDeeplyNestedObjects .method public hidebysig static void CollectionInitializerInsideObjectInitializers() cil managed { // Code size 53 (0x35) .maxstack 8 - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup - IL_000b: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_000b: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0010: dup IL_0011: ldc.i4.0 - IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0017: dup IL_0018: ldc.i4.1 - IL_0019: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0019: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001e: dup - IL_001f: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_001f: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0024: ldc.i4.0 - IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) - IL_002a: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) - IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0025: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_002a: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) + IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0034: ret - } // end of method InitializerTests::CollectionInitializerInsideObjectInitializers + } // end of method TestCases::CollectionInitializerInsideObjectInitializers .method public hidebysig static void NotAStructInitializer_DefaultConstructor() cil managed { // Code size 41 (0x29) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: ldloca.s V_0 - IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0008: ldloca.s V_0 IL_000a: ldc.i4.1 - IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0010: ldloca.s V_0 IL_0012: ldc.i4.2 - IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) - IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) + IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::NotAStructInitializer_DefaultConstructor + } // end of method TestCases::NotAStructInitializer_DefaultConstructor .method public hidebysig static void StructInitializer_DefaultConstructor() cil managed { // Code size 41 (0x29) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: ldloca.s V_0 - IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000d: ldloca.s V_0 IL_000f: ldc.i4.1 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0015: ldloca.s V_0 IL_0017: ldc.i4.2 - IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::StructInitializer_DefaultConstructor + } // end of method TestCases::StructInitializer_DefaultConstructor .method public hidebysig static void NotAStructInitializer_ExplicitConstructor() cil managed { // Code size 41 (0x29) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: ldloca.s V_0 IL_0002: ldc.i4.0 - IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0008: ldloca.s V_0 IL_000a: ldc.i4.1 - IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0010: ldloca.s V_0 IL_0012: ldc.i4.2 - IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) - IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) + IL_0018: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::NotAStructInitializer_ExplicitConstructor + } // end of method TestCases::NotAStructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializer_ExplicitConstructor() cil managed { // Code size 41 (0x29) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: ldloca.s V_0 IL_0007: ldc.i4.0 - IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_000d: ldloca.s V_0 IL_000f: ldc.i4.1 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0015: ldloca.s V_0 IL_0017: ldc.i4.2 - IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001d: ldloc.0 - IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001e: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: ret - } // end of method InitializerTests::StructInitializer_ExplicitConstructor + } // end of method TestCases::StructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializerWithInitializationOfNestedObjects() cil managed { // Code size 74 (0x4a) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0005: ldloca.s V_0 - IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0007: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000d: ldloca.s V_0 - IL_000f: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() + IL_000f: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() IL_0014: ldc.i4.0 - IL_0015: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0015: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001a: ldloca.s V_0 - IL_001c: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0021: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_001c: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0021: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0026: ldc.i4.0 - IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002c: ldloca.s V_0 - IL_002e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0033: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_002e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0033: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0038: ldc.i4.1 - IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_003e: ldloc.0 - IL_003f: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0044: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_003f: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0044: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0049: ret - } // end of method InitializerTests::StructInitializerWithInitializationOfNestedObjects + } // end of method TestCases::StructInitializerWithInitializationOfNestedObjects .method public hidebysig static void StructInitializerWithinObjectInitializer() cil managed { // Code size 47 (0x2f) .maxstack 5 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) - IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) + IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0005: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000a: dup IL_000b: ldloca.s V_0 IL_000d: ldc.i4.2 - IL_000e: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_000e: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0013: ldloca.s V_0 IL_0015: ldc.i4.1 - IL_0016: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0016: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_001b: ldloca.s V_0 IL_001d: ldc.i4.2 - IL_001e: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_001e: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0023: ldloc.0 - IL_0024: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) - IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0024: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) + IL_0029: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002e: ret - } // end of method InitializerTests::StructInitializerWithinObjectInitializer + } // end of method TestCases::StructInitializerWithinObjectInitializer .method public hidebysig static void Bug270_NestedInitialisers() cil managed { @@ -1347,7 +1443,7 @@ IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: ldnull - IL_0004: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Bug270_NestedInitialisers() + IL_0004: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Bug270_NestedInitialisers() IL_000a: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object, native int) IL_000f: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) @@ -1365,26 +1461,26 @@ IL_0033: callvirt instance void [mscorlib]System.Globalization.CultureInfo::set_DateTimeFormat(class [mscorlib]System.Globalization.DateTimeFormatInfo) IL_0038: dup IL_0039: ldloc.0 - IL_003a: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__46_0' + IL_003a: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__49_0' IL_003f: dup IL_0040: brtrue.s IL_0059 IL_0042: pop - IL_0043: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9' - IL_0048: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'b__46_0'(class [mscorlib]System.Globalization.NumberFormatInfo) + IL_0043: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9' + IL_0048: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'b__49_0'(class [mscorlib]System.Globalization.NumberFormatInfo) IL_004e: newobj instance void class [mscorlib]System.Func`2::.ctor(object, native int) IL_0053: dup - IL_0054: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__46_0' + IL_0054: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__49_0' IL_0059: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [mscorlib]System.Func`2) IL_005e: call !!0 [System.Core]System.Linq.Enumerable::First(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0063: callvirt instance void [mscorlib]System.Globalization.CultureInfo::set_NumberFormat(class [mscorlib]System.Globalization.NumberFormatInfo) IL_0068: callvirt instance void [mscorlib]System.Threading.Thread::set_CurrentCulture(class [mscorlib]System.Globalization.CultureInfo) - IL_006d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class [mscorlib]System.Threading.Thread) + IL_006d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class [mscorlib]System.Threading.Thread) IL_0072: ret - } // end of method InitializerTests::Bug270_NestedInitialisers + } // end of method TestCases::Bug270_NestedInitialisers .method public hidebysig static void Bug953_MissingNullableSpecifierForArrayInitializer() cil managed { @@ -1397,9 +1493,9 @@ IL_0008: ldsfld valuetype [mscorlib]System.Guid [mscorlib]System.Guid::Empty IL_000d: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) IL_0012: stelem valuetype [mscorlib]System.Nullable`1 - IL_0017: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::NoOp(valuetype [mscorlib]System.Nullable`1[]) + IL_0017: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::NoOp(valuetype [mscorlib]System.Nullable`1[]) IL_001c: ret - } // end of method InitializerTests::Bug953_MissingNullableSpecifierForArrayInitializer + } // end of method TestCases::Bug953_MissingNullableSpecifierForArrayInitializer .method public hidebysig specialname rtspecialname instance void .ctor() cil managed @@ -1409,9 +1505,9 @@ IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } // end of method InitializerTests::.ctor + } // end of method TestCases::.ctor -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases // ============================================================= diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.roslyn.il index 959e70c3a..b13b2d070 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.roslyn.il @@ -15,6 +15,7 @@ } .assembly InitializerTests { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .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. @@ -38,15 +39,89 @@ // =============== CLASS MEMBERS DECLARATION =================== -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions extends [mscorlib]System.Object { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig static void Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 inst, + int32 a, + int32 b) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method Extensions::Add + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases + extends [mscorlib]System.Object +{ + .class auto ansi nested public beforefieldinit CustomList`1 + extends [mscorlib]System.Object + implements class [mscorlib]System.Collections.Generic.IEnumerable`1, + [mscorlib]System.Collections.IEnumerable + { + .method public hidebysig newslot virtual final + instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetEnumerator() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: nop + IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0006: throw + } // end of method CustomList`1::GetEnumerator + + .method private hidebysig newslot virtual final + instance class [mscorlib]System.Collections.IEnumerator + System.Collections.IEnumerable.GetEnumerator() cil managed + { + .override [mscorlib]System.Collections.IEnumerable::GetEnumerator + // Code size 7 (0x7) + .maxstack 8 + IL_0000: nop + IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor() + IL_0006: throw + } // end of method CustomList`1::System.Collections.IEnumerable.GetEnumerator + + .method public hidebysig instance void + Add(string name) cil managed + { + // Code size 24 (0x18) + .maxstack 8 + IL_0000: nop + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0006: ldarg.1 + IL_0007: ldtoken !!T2 + IL_000c: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) + IL_0011: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) + IL_0016: nop + IL_0017: ret + } // end of method CustomList`1::Add + + .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 CustomList`1::.ctor + + } // end of class CustomList`1 + .class auto ansi nested public beforefieldinit C extends [mscorlib]System.Object { .field public int32 Z - .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S Y - .field public class [mscorlib]System.Collections.Generic.List`1 L + .field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S Y + .field public class [mscorlib]System.Collections.Generic.List`1 L .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { @@ -73,10 +148,10 @@ IL_0000: nop IL_0001: ldarg.0 IL_0002: ldarg.1 - IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0008: ldarg.0 IL_0009: ldc.i4.0 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_000f: ret } // end of method S::.ctor @@ -86,168 +161,168 @@ extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum a = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum b = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b = int32(0x00000001) } // end of class MyEnum .class auto ansi sealed nested private MyEnum2 extends [mscorlib]System.Enum { .field public specialname rtspecialname int32 value__ - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 c = int32(0x00000000) - .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum2 d = int32(0x00000001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 c = int32(0x00000000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum2 d = int32(0x00000001) } // end of class MyEnum2 .class auto ansi nested private beforefieldinit Data extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. - .field public class [mscorlib]System.Collections.Generic.List`1 FieldList - .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field public class [mscorlib]System.Collections.Generic.List`1 FieldList + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 class [mscorlib]System.Collections.Generic.List`1 'k__BackingField' + .field private class [mscorlib]System.Collections.Generic.List`1 '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'k__BackingField' + .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData '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 class [mscorlib]System.EventHandler TestEvent .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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_a() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_a .method public hidebysig specialname - instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_a .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum get_b() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_b .method public hidebysig specialname - instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum 'value') cil managed + instance void set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_b .method public hidebysig specialname - instance class [mscorlib]System.Collections.Generic.List`1 + instance class [mscorlib]System.Collections.Generic.List`1 get_PropertyList() 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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_PropertyList .method public hidebysig specialname - instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 'value') cil managed + instance void set_PropertyList(class [mscorlib]System.Collections.Generic.List`1 '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 class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_PropertyList .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() 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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_MoreData .method public hidebysig specialname - instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData get_NestedStruct() 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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0001: ldfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0006: ret } // end of method Data::get_NestedStruct .method public hidebysig specialname - instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData 'value') cil managed + instance void set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData '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 valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::'k__BackingField' + IL_0002: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::'k__BackingField' IL_0007: ret } // end of method Data::set_NestedStruct .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i) cil managed { // Code size 7 (0x7) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop IL_0001: ldnull IL_0002: stloc.0 @@ -259,7 +334,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 2 (0x2) .maxstack 8 @@ -268,13 +343,13 @@ } // end of method Data::set_Item .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_Item(int32 i, string j) cil managed { // Code size 7 (0x7) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop IL_0001: ldnull IL_0002: stloc.0 @@ -287,7 +362,7 @@ .method public hidebysig specialname instance void set_Item(int32 i, string j, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data 'value') cil managed { // Code size 2 (0x2) .maxstack 8 @@ -305,7 +380,7 @@ class [mscorlib]System.EventHandler V_1, class [mscorlib]System.EventHandler V_2) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -316,7 +391,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -340,7 +415,7 @@ class [mscorlib]System.EventHandler V_1, class [mscorlib]System.EventHandler V_2) IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 @@ -351,7 +426,7 @@ IL_0010: castclass [mscorlib]System.EventHandler IL_0015: stloc.2 IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::TestEvent + IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::TestEvent IL_001c: ldloc.2 IL_001d: ldloc.1 IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, @@ -371,8 +446,8 @@ // Code size 19 (0x13) .maxstack 8 IL_0000: ldarg.0 - IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0006: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_000b: ldarg.0 IL_000c: call instance void [mscorlib]System.Object::.ctor() IL_0011: nop @@ -381,55 +456,55 @@ .event [mscorlib]System.EventHandler TestEvent { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::remove_TestEvent(class [mscorlib]System.EventHandler) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::remove_TestEvent(class [mscorlib]System.EventHandler) } // end of event Data::TestEvent - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum a() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_a() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_a() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::a - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum b() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_b() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_b() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) } // end of property Data::b - .property instance class [mscorlib]System.Collections.Generic.List`1 + .property instance class [mscorlib]System.Collections.Generic.List`1 PropertyList() { - .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + .get instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) } // end of property Data::PropertyList - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property Data::MoreData - .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + .property instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData NestedStruct() { - .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_NestedStruct() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) + .get instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_NestedStruct() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) } // end of property Data::NestedStruct - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32) { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property Data::Item - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data Item(int32, string) { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32, - string) - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - string, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32, + string) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + string, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property Data::Item } // end of class Data @@ -440,7 +515,7 @@ .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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'k__BackingField' + .field private class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 ) .method public hidebysig specialname @@ -450,7 +525,7 @@ // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: ret } // end of method StructData::get_Property @@ -462,31 +537,31 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_Property .method public hidebysig specialname - instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data get_MoreData() 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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0006: ret } // end of method StructData::get_MoreData .method public hidebysig specialname - instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data 'value') cil managed + instance void set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data '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 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::'k__BackingField' + IL_0002: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::'k__BackingField' IL_0007: ret } // end of method StructData::set_MoreData @@ -497,27 +572,27 @@ .maxstack 8 IL_0000: nop IL_0001: ldarg.0 - IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0008: ldarg.0 IL_0009: ldarg.1 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_000f: ldarg.0 IL_0010: ldarg.1 - IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0016: nop IL_0017: ret } // end of method StructData::.ctor .property instance int32 Property() { - .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_Property() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_Property() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) } // end of property StructData::Property - .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data + .property instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data MoreData() { - .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + .get instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) } // end of property StructData::MoreData } // end of class StructData @@ -525,16 +600,16 @@ extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' '<>9' - .field public static class [mscorlib]System.EventHandler '<>9__26_0' - .field public static class [mscorlib]System.Func`2 '<>9__46_0' + .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' '<>9' + .field public static class [mscorlib]System.EventHandler '<>9__29_0' + .field public static class [mscorlib]System.Func`2 '<>9__49_0' .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::.ctor() - IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9' + IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::.ctor() + IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9' IL_000a: ret } // end of method '<>c'::.cctor @@ -550,7 +625,7 @@ } // end of method '<>c'::.ctor .method assembly hidebysig instance void - 'b__26_0'(object '', + 'b__29_0'(object '', class [mscorlib]System.EventArgs '') cil managed { // Code size 8 (0x8) @@ -559,10 +634,10 @@ IL_0001: call void [mscorlib]System.Console::WriteLine() IL_0006: nop IL_0007: ret - } // end of method '<>c'::'b__26_0' + } // end of method '<>c'::'b__29_0' .method assembly hidebysig instance bool - 'b__46_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed + 'b__49_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed { // Code size 17 (0x11) .maxstack 8 @@ -572,7 +647,7 @@ IL_000b: call bool [mscorlib]System.String::op_Equality(string, string) IL_0010: ret - } // end of method '<>c'::'b__46_0' + } // end of method '<>c'::'b__49_0' } // end of class '<>c' @@ -583,7 +658,7 @@ .maxstack 8 IL_0000: nop IL_0001: ret - } // end of method InitializerTests::X + } // end of method TestCases::X .method private hidebysig static object Y() cil managed @@ -598,7 +673,7 @@ IL_0005: ldloc.0 IL_0006: ret - } // end of method InitializerTests::Y + } // end of method TestCases::Y .method public hidebysig static void TestCall(int32 a, class [mscorlib]System.Threading.Thread thread) cil managed @@ -607,15 +682,15 @@ .maxstack 8 IL_0000: nop IL_0001: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C TestCall(int32 a, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C c) cil managed + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C c) cil managed { // Code size 7 (0x7) .maxstack 1 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) IL_0000: nop IL_0001: ldarg.1 IL_0002: stloc.0 @@ -623,26 +698,26 @@ IL_0005: ldloc.0 IL_0006: ret - } // end of method InitializerTests::TestCall + } // end of method TestCases::TestCall - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1() cil managed { // Code size 42 (0x2a) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() - IL_000d: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_000d: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0012: ldloc.0 - IL_0013: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L + IL_0013: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L IL_0018: ldc.i4.1 - IL_0019: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_001e: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0019: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_001e: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0023: nop IL_0024: ldloc.0 IL_0025: stloc.1 @@ -650,137 +725,137 @@ IL_0028: ldloc.1 IL_0029: ret - } // end of method InitializerTests::Test1 + } // end of method TestCases::Test1 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test1Alternative() cil managed { // Code size 41 (0x29) .maxstack 6 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) IL_0000: nop IL_0001: ldc.i4.1 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0007: dup - IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0008: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000d: dup IL_000e: ldc.i4.1 - IL_000f: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_0014: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_000f: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_0014: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0019: nop - IL_001a: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::L - IL_001f: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_001a: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::L + IL_001f: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_0024: stloc.0 IL_0025: br.s IL_0027 IL_0027: ldloc.0 IL_0028: ret - } // end of method InitializerTests::Test1Alternative + } // end of method TestCases::Test1Alternative - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test2() cil managed { // Code size 27 (0x1b) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000e: ldloc.0 IL_000f: ldc.i4.2 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_0015: ldloc.0 IL_0016: stloc.1 IL_0017: br.s IL_0019 IL_0019: ldloc.1 IL_001a: ret - } // end of method InitializerTests::Test2 + } // end of method TestCases::Test2 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3() cil managed { // Code size 37 (0x25) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.1 - IL_0009: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::.ctor(int32) - IL_000e: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0009: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::.ctor(int32) + IL_000e: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0013: ldloc.0 - IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0019: ldc.i4.2 - IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_001f: ldloc.0 IL_0020: stloc.1 IL_0021: br.s IL_0023 IL_0023: ldloc.1 IL_0024: ret - } // end of method InitializerTests::Test3 + } // end of method TestCases::Test3 - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test3b() cil managed { // Code size 36 (0x24) .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0) IL_0000: nop IL_0001: ldc.i4.0 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0007: dup IL_0008: ldc.i4.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_000e: dup - IL_000f: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_000f: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0014: ldc.i4.2 - IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A - IL_001a: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C) + IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A + IL_001a: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C) IL_001f: stloc.0 IL_0020: br.s IL_0022 IL_0022: ldloc.0 IL_0023: ret - } // end of method InitializerTests::Test3b + } // end of method TestCases::Test3b - .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C + .method public hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C Test4() cil managed { // Code size 44 (0x2c) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C V_1) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_0, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C V_1) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_0008: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_000d: ldc.i4.1 - IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::A + IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::A IL_0013: ldloc.0 IL_0014: ldc.i4.2 - IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Z + IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Z IL_001a: ldloc.0 - IL_001b: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/C::Y + IL_001b: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/C::Y IL_0020: ldc.i4.3 - IL_0021: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/S::B + IL_0021: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/S::B IL_0026: ldloc.0 IL_0027: stloc.1 IL_0028: br.s IL_002a IL_002a: ldloc.1 IL_002b: ret - } // end of method InitializerTests::Test4 + } // end of method TestCases::Test4 .method public hidebysig static void InvalidIndices(int32 a) cil managed { @@ -795,13 +870,13 @@ IL_0009: ldc.i4.1 IL_000a: ldarg.0 IL_000b: stelem.i4 - IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0011: ldloc.0 - IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0017: nop IL_0018: ret - } // end of method InitializerTests::InvalidIndices + } // end of method TestCases::InvalidIndices .method public hidebysig static void InvalidIndices2(int32 a) cil managed { @@ -816,13 +891,13 @@ IL_0009: ldc.i4.m1 IL_000a: ldarg.0 IL_000b: stelem.i4 - IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000c: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0011: ldloc.0 - IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0017: nop IL_0018: ret - } // end of method InitializerTests::InvalidIndices2 + } // end of method TestCases::InvalidIndices2 .method public hidebysig static void IndicesInWrongOrder(int32 a, int32 b) cil managed @@ -842,20 +917,60 @@ IL_000d: ldc.i4.1 IL_000e: ldarg.0 IL_000f: stelem.i4 - IL_0010: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0010: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0015: ldloc.0 - IL_0016: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0016: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001b: nop IL_001c: ret - } // end of method InitializerTests::IndicesInWrongOrder + } // end of method TestCases::IndicesInWrongOrder + + .method public hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 + ExtensionMethodInCollectionInitializer() cil managed + { + // Code size 20 (0x14) + .maxstack 4 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_0) + IL_0000: nop + IL_0001: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: ldc.i4.2 + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.Extensions::Add(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1, + int32, + int32) + IL_000e: nop + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method TestCases::ExtensionMethodInCollectionInitializer + + .method public hidebysig static void NoCollectionInitializerBecauseOfTypeArguments() cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1 V_0) + IL_0000: nop + IL_0001: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::.ctor() + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldstr "int" + IL_000d: callvirt instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/CustomList`1::Add(string) + IL_0012: nop + IL_0013: ldloc.0 + IL_0014: call void [mscorlib]System.Console::WriteLine(object) + IL_0019: nop + IL_001a: ret + } // end of method TestCases::NoCollectionInitializerBecauseOfTypeArguments .method public hidebysig static void CollectionInitializerList() cil managed { // Code size 42 (0x2a) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_000b: dup IL_000c: ldc.i4.1 @@ -869,11 +984,11 @@ IL_001c: ldc.i4.3 IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0022: nop - IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0023: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0028: nop IL_0029: ret - } // end of method InitializerTests::CollectionInitializerList + } // end of method TestCases::CollectionInitializerList .method public hidebysig static object RecursiveCollectionInitializer() cil managed @@ -895,14 +1010,14 @@ IL_0013: ldloc.1 IL_0014: ret - } // end of method InitializerTests::RecursiveCollectionInitializer + } // end of method TestCases::RecursiveCollectionInitializer .method public hidebysig static void CollectionInitializerDictionary() cil managed { // Code size 57 (0x39) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000b: dup IL_000c: ldstr "First" @@ -922,36 +1037,36 @@ IL_002c: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, !1) IL_0031: nop - IL_0032: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0032: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0037: nop IL_0038: ret - } // end of method InitializerTests::CollectionInitializerDictionary + } // end of method TestCases::CollectionInitializerDictionary .method public hidebysig static void CollectionInitializerDictionaryWithEnumTypes() cil managed { // Code size 36 (0x24) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_000b: dup IL_000c: ldc.i4.0 IL_000d: ldc.i4.0 - IL_000e: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_000e: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_0013: nop IL_0014: dup IL_0015: ldc.i4.1 IL_0016: ldc.i4.1 - IL_0017: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, - !1) + IL_0017: callvirt instance void class [mscorlib]System.Collections.Generic.Dictionary`2::Add(!0, + !1) IL_001c: nop - IL_001d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_001d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0022: nop IL_0023: ret - } // end of method InitializerTests::CollectionInitializerDictionaryWithEnumTypes + } // end of method TestCases::CollectionInitializerDictionaryWithEnumTypes .method public hidebysig static void NotACollectionInitializer() cil managed { @@ -973,216 +1088,216 @@ IL_0018: ldc.i4.3 IL_0019: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001e: nop - IL_001f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0024: ldloc.0 - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::NotACollectionInitializer + } // end of method TestCases::NotACollectionInitializer .method public hidebysig static void ObjectInitializer() cil managed { // Code size 26 (0x1a) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: nop - IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0013: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0018: nop IL_0019: ret - } // end of method InitializerTests::ObjectInitializer + } // end of method TestCases::ObjectInitializer .method public hidebysig static void NotAnObjectInitializer() cil managed { // Code size 28 (0x1c) .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.0 - IL_0009: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0009: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_000e: nop - IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_000f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0014: ldloc.0 - IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_001a: nop IL_001b: ret - } // end of method InitializerTests::NotAnObjectInitializer + } // end of method TestCases::NotAnObjectInitializer .method public hidebysig static void NotAnObjectInitializerWithEvent() cil managed { // Code size 58 (0x3a) .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data V_0) + .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data V_0) IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0006: stloc.0 IL_0007: ldloc.0 - IL_0008: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__26_0' + IL_0008: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__29_0' IL_000d: dup IL_000e: brtrue.s IL_0027 IL_0010: pop - IL_0011: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9' - IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'b__26_0'(object, - class [mscorlib]System.EventArgs) + IL_0011: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9' + IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'b__29_0'(object, + class [mscorlib]System.EventArgs) IL_001c: newobj instance void [mscorlib]System.EventHandler::.ctor(object, native int) IL_0021: dup - IL_0022: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__26_0' - IL_0027: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::add_TestEvent(class [mscorlib]System.EventHandler) + IL_0022: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__29_0' + IL_0027: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler) IL_002c: nop - IL_002d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_002d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0032: ldloc.0 - IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0033: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0038: nop IL_0039: ret - } // end of method InitializerTests::NotAnObjectInitializerWithEvent + } // end of method TestCases::NotAnObjectInitializerWithEvent .method public hidebysig static void ObjectInitializerAssignCollectionToField() cil managed { // Code size 53 (0x35) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: nop IL_0013: dup - IL_0014: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0014: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_0019: dup IL_001a: ldc.i4.0 - IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: nop IL_0021: dup IL_0022: ldc.i4.1 - IL_0023: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0023: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0028: nop - IL_0029: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList - IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0029: stfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList + IL_002e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0033: nop IL_0034: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToField + } // end of method TestCases::ObjectInitializerAssignCollectionToField .method public hidebysig static void ObjectInitializerAddToCollectionInField() cil managed { // Code size 52 (0x34) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: nop IL_0013: dup - IL_0014: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0014: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0019: ldc.i4.0 - IL_001a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001f: nop IL_0020: dup - IL_0021: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0021: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0026: ldc.i4.1 - IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002c: nop - IL_002d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0032: nop IL_0033: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInField + } // end of method TestCases::ObjectInitializerAddToCollectionInField .method public hidebysig static void ObjectInitializerAssignCollectionToProperty() cil managed { // Code size 54 (0x36) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: nop IL_0013: dup - IL_0014: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() + IL_0014: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor() IL_0019: dup IL_001a: ldc.i4.0 - IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0020: nop IL_0021: dup IL_0022: ldc.i4.1 - IL_0023: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0023: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0028: nop - IL_0029: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) + IL_0029: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_PropertyList(class [mscorlib]System.Collections.Generic.List`1) IL_002e: nop - IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002f: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0034: nop IL_0035: ret - } // end of method InitializerTests::ObjectInitializerAssignCollectionToProperty + } // end of method TestCases::ObjectInitializerAssignCollectionToProperty .method public hidebysig static void ObjectInitializerAddToCollectionInProperty() cil managed { // Code size 52 (0x34) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldc.i4.0 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: nop IL_0013: dup - IL_0014: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0014: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0019: ldc.i4.0 - IL_001a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001a: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_001f: nop IL_0020: dup - IL_0021: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0021: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0026: ldc.i4.1 - IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0027: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002c: nop - IL_002d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0032: nop IL_0033: ret - } // end of method InitializerTests::ObjectInitializerAddToCollectionInProperty + } // end of method TestCases::ObjectInitializerAddToCollectionInProperty .method public hidebysig static void ObjectInitializerWithInitializationOfNestedObjects() cil managed { // Code size 49 (0x31) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup - IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0011: ldc.i4.0 - IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0017: nop IL_0018: dup - IL_0019: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_001e: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0019: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_001e: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0023: ldc.i4.1 - IL_0024: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0024: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0029: nop - IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002f: nop IL_0030: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfNestedObjects .method private hidebysig static int32 GetInt() cil managed @@ -1197,7 +1312,7 @@ IL_0005: ldloc.0 IL_0006: ret - } // end of method InitializerTests::GetInt + } // end of method TestCases::GetInt .method private hidebysig static string GetString() cil managed @@ -1212,7 +1327,7 @@ IL_0009: ldloc.0 IL_000a: ret - } // end of method InitializerTests::GetString + } // end of method TestCases::GetString .method private hidebysig static void NoOp(valuetype [mscorlib]System.Nullable`1[] 'array') cil managed { @@ -1220,32 +1335,32 @@ .maxstack 8 IL_0000: nop IL_0001: ret - } // end of method InitializerTests::NoOp + } // end of method TestCases::NoOp .method public hidebysig static void SimpleDictInitializer() cil managed { // Code size 45 (0x2d) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup - IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0011: ldc.i4.0 - IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0017: nop IL_0018: dup - IL_0019: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0019: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_001e: ldc.i4.2 IL_001f: ldnull - IL_0020: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_0020: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_0025: nop - IL_0026: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0026: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002b: nop IL_002c: ret - } // end of method InitializerTests::SimpleDictInitializer + } // end of method TestCases::SimpleDictInitializer .method public hidebysig static void MixedObjectAndDictInitializer() cil managed { @@ -1255,59 +1370,59 @@ int32 V_1, string V_2) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup - IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_000c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0011: ldc.i4.0 - IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0017: nop - IL_0018: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::GetInt() + IL_0018: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::GetInt() IL_001d: stloc.0 IL_001e: dup - IL_001f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_001f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0024: ldloc.0 - IL_0025: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + IL_0025: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) IL_002a: ldc.i4.1 - IL_002b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_002b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0030: nop IL_0031: dup - IL_0032: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0032: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0037: ldloc.0 - IL_0038: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) - IL_003d: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0038: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) + IL_003d: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0042: ldc.i4.0 - IL_0043: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0043: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0048: nop - IL_0049: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::GetInt() + IL_0049: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::GetInt() IL_004e: stloc.1 - IL_004f: call string ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::GetString() + IL_004f: call string ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::GetString() IL_0054: stloc.2 IL_0055: dup - IL_0056: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0056: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_005b: ldloc.0 - IL_005c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + IL_005c: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) IL_0061: ldloc.1 IL_0062: ldloc.2 - IL_0063: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() - IL_0068: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - string, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_0063: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() + IL_0068: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + string, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_006d: nop IL_006e: dup - IL_006f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_006f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0074: ldloc.0 - IL_0075: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_Item(int32) + IL_0075: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_Item(int32) IL_007a: ldc.i4.2 IL_007b: ldnull - IL_007c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_Item(int32, - class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_007c: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_Item(int32, + class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_0081: nop - IL_0082: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0082: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0087: nop IL_0088: ret - } // end of method InitializerTests::MixedObjectAndDictInitializer + } // end of method TestCases::MixedObjectAndDictInitializer .method public hidebysig instance void NestedListWithIndexInitializer() cil managed @@ -1337,230 +1452,230 @@ IL_002f: nop IL_0030: stloc.0 IL_0031: ret - } // end of method InitializerTests::NestedListWithIndexInitializer + } // end of method TestCases::NestedListWithIndexInitializer .method public hidebysig static void ObjectInitializerWithInitializationOfDeeplyNestedObjects() cil managed { // Code size 82 (0x52) .maxstack 4 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldc.i4.1 - IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_000d: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0012: nop IL_0013: dup - IL_0014: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0014: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0019: ldc.i4.0 - IL_001a: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_001a: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001f: nop IL_0020: dup - IL_0021: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0026: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_002b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0030: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_0035: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_003a: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() - IL_003f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_MoreData() + IL_0021: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0026: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_002b: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0030: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_0035: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_003a: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() + IL_003f: callvirt instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_MoreData() IL_0044: ldc.i4.1 - IL_0045: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0045: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_004a: nop - IL_004b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_004b: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0050: nop IL_0051: ret - } // end of method InitializerTests::ObjectInitializerWithInitializationOfDeeplyNestedObjects + } // end of method TestCases::ObjectInitializerWithInitializationOfDeeplyNestedObjects .method public hidebysig static void CollectionInitializerInsideObjectInitializers() cil managed { // Code size 59 (0x3b) .maxstack 8 IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup - IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_0011: dup IL_0012: ldc.i4.0 - IL_0013: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0013: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0018: nop IL_0019: dup IL_001a: ldc.i4.1 - IL_001b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_001b: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_0020: nop IL_0021: dup - IL_0022: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::get_PropertyList() + IL_0022: callvirt instance class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::get_PropertyList() IL_0027: ldc.i4.0 - IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002d: nop - IL_002e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data) + IL_002e: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_MoreData(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data) IL_0033: nop - IL_0034: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0034: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0039: nop IL_003a: ret - } // end of method InitializerTests::CollectionInitializerInsideObjectInitializers + } // end of method TestCases::CollectionInitializerInsideObjectInitializers .method public hidebysig static void NotAStructInitializer_DefaultConstructor() cil managed { // Code size 44 (0x2c) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop IL_0001: ldloca.s V_0 - IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_0009: ldloca.s V_0 IL_000b: ldc.i4.1 - IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0011: ldloca.s V_0 IL_0013: ldc.i4.2 - IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0019: nop - IL_001a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001f: ldloc.0 - IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::NotAStructInitializer_DefaultConstructor + } // end of method TestCases::NotAStructInitializer_DefaultConstructor .method public hidebysig static void StructInitializer_DefaultConstructor() cil managed { // Code size 44 (0x2c) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: ldloca.s V_0 - IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000e: ldloca.s V_0 IL_0010: ldc.i4.1 - IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0016: ldloca.s V_0 IL_0018: ldc.i4.2 - IL_0019: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0019: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001e: nop IL_001f: ldloc.0 - IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::StructInitializer_DefaultConstructor + } // end of method TestCases::StructInitializer_DefaultConstructor .method public hidebysig static void NotAStructInitializer_ExplicitConstructor() cil managed { // Code size 44 (0x2c) .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop IL_0001: ldloca.s V_0 IL_0003: ldc.i4.0 - IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0009: ldloca.s V_0 IL_000b: ldc.i4.1 - IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0011: ldloca.s V_0 IL_0013: ldc.i4.2 - IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0019: nop - IL_001a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_001a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_001f: ldloc.0 - IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::NotAStructInitializer_ExplicitConstructor + } // end of method TestCases::NotAStructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializer_ExplicitConstructor() cil managed { // Code size 44 (0x2c) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: ldloca.s V_0 IL_0008: ldc.i4.0 - IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_000e: ldloca.s V_0 IL_0010: ldc.i4.1 - IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_0016: ldloca.s V_0 IL_0018: ldc.i4.2 - IL_0019: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_0019: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_001e: nop IL_001f: ldloc.0 - IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0020: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0025: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_002a: nop IL_002b: ret - } // end of method InitializerTests::StructInitializer_ExplicitConstructor + } // end of method TestCases::StructInitializer_ExplicitConstructor .method public hidebysig static void StructInitializerWithInitializationOfNestedObjects() cil managed { // Code size 79 (0x4f) .maxstack 3 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() IL_0006: ldloca.s V_0 - IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData + IL_0008: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData IL_000e: ldloca.s V_0 - IL_0010: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() + IL_0010: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() IL_0015: ldc.i4.0 - IL_0016: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/MyEnum) + IL_0016: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_a(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/MyEnum) IL_001b: nop IL_001c: ldloca.s V_0 - IL_001e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0023: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_001e: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0023: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_0028: ldc.i4.0 - IL_0029: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0029: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_002e: nop IL_002f: ldloca.s V_0 - IL_0031: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::get_MoreData() - IL_0036: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::FieldList + IL_0031: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::get_MoreData() + IL_0036: ldfld class [mscorlib]System.Collections.Generic.List`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::FieldList IL_003b: ldc.i4.1 - IL_003c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_003c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) IL_0041: nop IL_0042: ldloc.0 - IL_0043: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData - IL_0048: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_0043: box ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData + IL_0048: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_004d: nop IL_004e: ret - } // end of method InitializerTests::StructInitializerWithInitializationOfNestedObjects + } // end of method TestCases::StructInitializerWithInitializationOfNestedObjects .method public hidebysig static void StructInitializerWithinObjectInitializer() cil managed { // Code size 51 (0x33) .maxstack 5 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData V_0) + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData V_0) IL_0000: nop - IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Y() - IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::.ctor() + IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y() + IL_0006: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor() IL_000b: dup IL_000c: ldloca.s V_0 IL_000e: ldc.i4.2 - IL_000f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::.ctor(int32) + IL_000f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::.ctor(int32) IL_0014: ldloca.s V_0 IL_0016: ldc.i4.1 - IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::Field + IL_0017: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::Field IL_001c: ldloca.s V_0 IL_001e: ldc.i4.2 - IL_001f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData::set_Property(int32) + IL_001f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData::set_Property(int32) IL_0024: nop IL_0025: ldloc.0 - IL_0026: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/StructData) + IL_0026: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::set_NestedStruct(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/StructData) IL_002b: nop - IL_002c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::X(object, - object) + IL_002c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::X(object, + object) IL_0031: nop IL_0032: ret - } // end of method InitializerTests::StructInitializerWithinObjectInitializer + } // end of method TestCases::StructInitializerWithinObjectInitializer .method public hidebysig static void Bug270_NestedInitialisers() cil managed { @@ -1572,7 +1687,7 @@ IL_0002: stloc.0 IL_0003: ldc.i4.0 IL_0004: ldnull - IL_0005: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::Bug270_NestedInitialisers() + IL_0005: ldftn void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Bug270_NestedInitialisers() IL_000b: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object, native int) IL_0010: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) @@ -1593,17 +1708,17 @@ IL_003b: nop IL_003c: dup IL_003d: ldloc.0 - IL_003e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__46_0' + IL_003e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__49_0' IL_0043: dup IL_0044: brtrue.s IL_005d IL_0046: pop - IL_0047: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9' - IL_004c: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'b__46_0'(class [mscorlib]System.Globalization.NumberFormatInfo) + IL_0047: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9' + IL_004c: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'b__49_0'(class [mscorlib]System.Globalization.NumberFormatInfo) IL_0052: newobj instance void class [mscorlib]System.Func`2::.ctor(object, native int) IL_0057: dup - IL_0058: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests/'<>c'::'<>9__46_0' + IL_0058: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__49_0' IL_005d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [mscorlib]System.Func`2) IL_0062: call !!0 [System.Core]System.Linq.Enumerable::First(class [mscorlib]System.Collections.Generic.IEnumerable`1) @@ -1611,11 +1726,11 @@ IL_006c: nop IL_006d: callvirt instance void [mscorlib]System.Threading.Thread::set_CurrentCulture(class [mscorlib]System.Globalization.CultureInfo) IL_0072: nop - IL_0073: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::TestCall(int32, - class [mscorlib]System.Threading.Thread) + IL_0073: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::TestCall(int32, + class [mscorlib]System.Threading.Thread) IL_0078: nop IL_0079: ret - } // end of method InitializerTests::Bug270_NestedInitialisers + } // end of method TestCases::Bug270_NestedInitialisers .method public hidebysig static void Bug953_MissingNullableSpecifierForArrayInitializer() cil managed { @@ -1629,10 +1744,10 @@ IL_0009: ldsfld valuetype [mscorlib]System.Guid [mscorlib]System.Guid::Empty IL_000e: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) IL_0013: stelem valuetype [mscorlib]System.Nullable`1 - IL_0018: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests::NoOp(valuetype [mscorlib]System.Nullable`1[]) + IL_0018: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::NoOp(valuetype [mscorlib]System.Nullable`1[]) IL_001d: nop IL_001e: ret - } // end of method InitializerTests::Bug953_MissingNullableSpecifierForArrayInitializer + } // end of method TestCases::Bug953_MissingNullableSpecifierForArrayInitializer .method public hidebysig specialname rtspecialname instance void .ctor() cil managed @@ -1643,9 +1758,9 @@ IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: nop IL_0007: ret - } // end of method InitializerTests::.ctor + } // end of method TestCases::.ctor -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases // ============================================================= diff --git a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs index 0283ceec5..b9c12106f 100644 --- a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs @@ -1989,7 +1989,7 @@ namespace ICSharpCode.Decompiler.CSharp indexVariables.Add(indexStore.Variable, indexStore.Value); continue; } - var info = IL.Transforms.AccessPathElement.GetAccessPath(inst, initObjRR.Type, allowDictionaryInitializer: settings.DictionaryInitializers); + var info = IL.Transforms.AccessPathElement.GetAccessPath(inst, initObjRR.Type, settings: settings); if (info.Kind == IL.Transforms.AccessPathKind.Invalid) continue; if (currentPath == null) { currentPath = info.Path; @@ -2012,7 +2012,7 @@ namespace ICSharpCode.Decompiler.CSharp var memberRR = new MemberResolveResult(initObjRR, lastElement.Member); switch (info.Kind) { case IL.Transforms.AccessPathKind.Adder: - elementsStack.Peek().Add(MakeInitializerElements(info.Values, ((IMethod)lastElement.Member).Parameters)); + elementsStack.Peek().Add(MakeInitializerElements(lastElement.OpCode, (IMethod)lastElement.Member, initObjRR, info.Values)); break; case IL.Transforms.AccessPathKind.Setter: if (lastElement.Indices?.Length > 0) { @@ -2062,20 +2062,19 @@ namespace ICSharpCode.Decompiler.CSharp } } - Expression MakeInitializerElements(List values, IReadOnlyList parameters) + Expression MakeInitializerElements(OpCode opCode, IMethod method, ResolveResult targetResolveResult, List values) { + int firstParameterOffset = method.IsExtensionMethod ? 1 : 0; if (values.Count == 1) { - return Translate(values[0], typeHint: parameters[0].Type).ConvertTo(parameters[0].Type, this); + return Translate(values[0], typeHint: method.Parameters[firstParameterOffset].Type).ConvertTo(method.Parameters[0].Type, this); } var expressions = new Expression[values.Count]; for (int i = 0; i < values.Count; i++) { - expressions[i] = Translate(values[i], typeHint: parameters[i].Type).ConvertTo(parameters[i].Type, this); + expressions[i] = Translate(values[i], typeHint: method.Parameters[i + firstParameterOffset].Type).ConvertTo(method.Parameters[i + firstParameterOffset].Type, this); } return new ArrayInitializerExpression(expressions); } - readonly static ArraySpecifier[] NoSpecifiers = new ArraySpecifier[0]; - TranslatedExpression TranslateArrayInitializer(Block block) { var stloc = block.Instructions.FirstOrDefault() as StLoc; @@ -2129,7 +2128,7 @@ namespace ICSharpCode.Decompiler.CSharp additionalSpecifiers = compType.ArraySpecifiers.Select(a => (ArraySpecifier)a.Clone()).ToArray(); compType.ArraySpecifiers.Clear(); } else { - additionalSpecifiers = NoSpecifiers; + additionalSpecifiers = Empty.Array; } } var expr = new ArrayCreateExpression { @@ -2137,7 +2136,7 @@ namespace ICSharpCode.Decompiler.CSharp Initializer = root }; expr.AdditionalArraySpecifiers.AddRange(additionalSpecifiers); - if (!(bool)type.ContainsAnonymousType()) + if (!type.ContainsAnonymousType()) expr.Arguments.AddRange(newArr.Indices.Select(i => Translate(i).Expression)); return expr.WithILInstruction(block) .WithRR(new ArrayCreateResolveResult(new ArrayType(compilation, type, dimensions), newArr.Indices.Select(i => Translate(i).ResolveResult).ToArray(), elementResolveResults)); diff --git a/ICSharpCode.Decompiler/CSharp/Transforms/IntroduceExtensionMethods.cs b/ICSharpCode.Decompiler/CSharp/Transforms/IntroduceExtensionMethods.cs index b1f059896..13e878b45 100644 --- a/ICSharpCode.Decompiler/CSharp/Transforms/IntroduceExtensionMethods.cs +++ b/ICSharpCode.Decompiler/CSharp/Transforms/IntroduceExtensionMethods.cs @@ -158,5 +158,25 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms return false; return method.Equals(or.GetBestCandidateWithSubstitutedTypeArguments()); } + + public static bool CanTransformToExtensionMethodCall(IMethod method, CSharpTypeResolveContext resolveContext, bool ignoreTypeArguments = false, bool ignoreArgumentNames = true) + { + if (method.Parameters.Count == 0) return false; + var targetType = method.Parameters.Select(p => new ResolveResult(p.Type)).First(); + var paramTypes = method.Parameters.Skip(1).Select(p => new ResolveResult(p.Type)).ToArray(); + var paramNames = ignoreArgumentNames ? null : method.Parameters.SelectArray(p => p.Name); + var typeArgs = ignoreTypeArguments ? Empty.Array : method.TypeArguments.ToArray(); + var resolver = new CSharpResolver(resolveContext); + return CanTransformToExtensionMethodCall(resolver, method, typeArgs, targetType, paramTypes, argumentNames: paramNames); + } + + public static bool CanInferTypeArgumentsFromParameters(IMethod method, IReadOnlyList arguments, ITypeResolveContext resolveContext) + { + if (method.TypeParameters.Count == 0) + return true; + var inference = new TypeInference(resolveContext.Compilation); + inference.InferTypeArguments(method.TypeParameters, arguments, method.Parameters.SelectArray(p => p.Type), out bool success); + return success; + } } } \ No newline at end of file diff --git a/ICSharpCode.Decompiler/DecompilerSettings.cs b/ICSharpCode.Decompiler/DecompilerSettings.cs index f0a285d84..e3ac84932 100644 --- a/ICSharpCode.Decompiler/DecompilerSettings.cs +++ b/ICSharpCode.Decompiler/DecompilerSettings.cs @@ -73,6 +73,7 @@ namespace ICSharpCode.Decompiler nullPropagation = false; stringInterpolation = false; dictionaryInitializers = false; + extensionMethodsInCollectionInitializers = false; } if (languageVersion < CSharp.LanguageVersion.CSharp7) { outVariables = false; @@ -478,6 +479,22 @@ namespace ICSharpCode.Decompiler } } + bool extensionMethodsInCollectionInitializers = true; + + /// + /// Gets/Sets whether to use C# 6.0 Extension Add methods in collection initializers. + /// Only has an effect if ObjectOrCollectionInitializers is enabled. + /// + public bool ExtensionMethodsInCollectionInitializers { + get { return extensionMethodsInCollectionInitializers; } + set { + if (extensionMethodsInCollectionInitializers != value) { + extensionMethodsInCollectionInitializers = value; + OnPropertyChanged(); + } + } + } + bool stringInterpolation = true; /// diff --git a/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs b/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs index f8f218087..b89301502 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs @@ -197,7 +197,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms if (call.Arguments.Count == 0) { return false; } - if (call.Method.IsStatic && (!call.Method.IsExtensionMethod || !CanTransformToExtensionMethodCall(call))) { + if (call.Method.IsStatic && (!call.Method.IsExtensionMethod || !CanTransformToExtensionMethodCall(call, context))) { return false; // only instance or extension methods can be called with ?. syntax } if (call.Method.IsAccessor && !IsGetter(call.Method)) { @@ -255,19 +255,15 @@ namespace ICSharpCode.Decompiler.IL.Transforms throw new ArgumentOutOfRangeException("mode"); } } - } - bool CanTransformToExtensionMethodCall(CallInstruction call) - { - if (call.Method.Parameters.Count == 0) return false; - var targetType = call.Method.Parameters.Select(p => new ResolveResult(p.Type)).First(); - var paramTypes = call.Method.Parameters.Skip(1).Select(p => new ResolveResult(p.Type)).ToArray(); - var paramNames = call.Method.Parameters.SelectArray(p => p.Name); - var typeArgs = call.Method.TypeArguments.ToArray(); - var resolveContext = new CSharp.TypeSystem.CSharpTypeResolveContext(context.TypeSystem.Compilation.MainAssembly, context.UsingScope); - var resolver = new CSharp.Resolver.CSharpResolver(resolveContext); - return CSharp.Transforms.IntroduceExtensionMethods.CanTransformToExtensionMethodCall( - resolver, call.Method, typeArgs, targetType, paramTypes, argumentNames: null); + bool CanTransformToExtensionMethodCall(CallInstruction call, ILTransformContext context) + { + return CSharp.Transforms.IntroduceExtensionMethods.CanTransformToExtensionMethodCall( + call.Method, new CSharp.TypeSystem.CSharpTypeResolveContext( + context.TypeSystem.Compilation.MainAssembly, context.UsingScope + ) + ); + } } static bool IsGetter(IMethod method) diff --git a/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs b/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs index d2a94eec7..f9b1cd2c9 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs @@ -19,6 +19,9 @@ using System; using System.Collections.Generic; using System.Linq; +using ICSharpCode.Decompiler.CSharp.Resolver; +using ICSharpCode.Decompiler.CSharp.TypeSystem; +using ICSharpCode.Decompiler.Semantics; using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.Util; @@ -175,7 +178,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms possibleIndexVariables.Add(stloc.Variable, (stloc.ChildIndex, stloc.Value)); return true; } - (var kind, var newPath, var values, var targetVariable) = AccessPathElement.GetAccessPath(instructions[pos], rootType, possibleIndexVariables, allowDictionaryInitializer: context.Settings.DictionaryInitializers); + var resolveContext = new CSharpTypeResolveContext(context.TypeSystem.Compilation.MainAssembly, context.UsingScope); + (var kind, var newPath, var values, var targetVariable) = AccessPathElement.GetAccessPath(instructions[pos], rootType, context.Settings, resolveContext, possibleIndexVariables); if (kind == AccessPathKind.Invalid || target != targetVariable) return false; // Treat last element separately: @@ -228,19 +232,23 @@ namespace ICSharpCode.Decompiler.IL.Transforms public struct AccessPathElement : IEquatable { - public AccessPathElement(IMember member, ILInstruction[] indices = null) + public AccessPathElement(OpCode opCode, IMember member, ILInstruction[] indices = null) { + this.OpCode = opCode; this.Member = member; this.Indices = indices; } + public readonly OpCode OpCode; public readonly IMember Member; public readonly ILInstruction[] Indices; public override string ToString() => $"[{Member}, {Indices}]"; public static (AccessPathKind Kind, List Path, List Values, ILVariable Target) GetAccessPath( - ILInstruction instruction, IType rootType, Dictionary possibleIndexVariables = null, bool allowDictionaryInitializer = false) + ILInstruction instruction, IType rootType, DecompilerSettings settings, + CSharpTypeResolveContext resolveContext = null, + Dictionary possibleIndexVariables = null) { List path = new List(); ILVariable target = null; @@ -253,13 +261,13 @@ namespace ICSharpCode.Decompiler.IL.Transforms case CallInstruction call: if (!(call is CallVirt || call is Call)) goto default; method = call.Method; - if (!IsMethodApplicable(method, call.Arguments, rootType)) goto default; + if (resolveContext != null && !IsMethodApplicable(method, call.Arguments, rootType, resolveContext, settings)) goto default; instruction = call.Arguments[0]; if (method.IsAccessor) { var property = method.AccessorOwner as IProperty; var isGetter = method.Equals(property?.Getter); var indices = call.Arguments.Skip(1).Take(call.Arguments.Count - (isGetter ? 1 : 2)).ToArray(); - if (indices.Length > 0 && !allowDictionaryInitializer) goto default; + if (indices.Length > 0 && !settings.DictionaryInitializers) goto default; if (possibleIndexVariables != null) { // Mark all index variables as used foreach (var index in indices.OfType()) { @@ -267,9 +275,9 @@ namespace ICSharpCode.Decompiler.IL.Transforms possibleIndexVariables[index.Variable] = (-1, info.Value); } } - path.Insert(0, new AccessPathElement(method.AccessorOwner, indices)); + path.Insert(0, new AccessPathElement(call.OpCode, method.AccessorOwner, indices)); } else { - path.Insert(0, new AccessPathElement(method)); + path.Insert(0, new AccessPathElement(call.OpCode, method)); } if (values == null) { if (method.IsAccessor) { @@ -285,7 +293,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms break; case LdObj ldobj: { if (ldobj.Target is LdFlda ldflda) { - path.Insert(0, new AccessPathElement(ldflda.Field)); + path.Insert(0, new AccessPathElement(ldobj.OpCode, ldflda.Field)); instruction = ldflda.Target; break; } @@ -293,7 +301,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms } case StObj stobj: { if (stobj.Target is LdFlda ldflda) { - path.Insert(0, new AccessPathElement(ldflda.Field)); + path.Insert(0, new AccessPathElement(stobj.OpCode, ldflda.Field)); instruction = ldflda.Target; if (values == null) { values = new List(new[] { stobj.Value }); @@ -312,7 +320,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms instruction = null; break; case LdFlda ldflda: - path.Insert(0, new AccessPathElement(ldflda.Field)); + path.Insert(0, new AccessPathElement(ldflda.OpCode, ldflda.Field)); instruction = ldflda.Target; break; default: @@ -326,18 +334,23 @@ namespace ICSharpCode.Decompiler.IL.Transforms return (kind, path, values, target); } - static bool IsMethodApplicable(IMethod method, IList arguments, IType rootType) + static bool IsMethodApplicable(IMethod method, IReadOnlyList arguments, IType rootType, CSharpTypeResolveContext resolveContext, DecompilerSettings settings) { - if (!method.IsExtensionMethod && method.IsStatic) + if (method.IsStatic && !method.IsExtensionMethod) return false; if (method.IsAccessor) return true; if (!"Add".Equals(method.Name, StringComparison.Ordinal) || arguments.Count == 0) return false; + if (method.IsExtensionMethod) + return settings.ExtensionMethodsInCollectionInitializers + && CSharp.Transforms.IntroduceExtensionMethods.CanTransformToExtensionMethodCall(method, resolveContext, ignoreTypeArguments: true); var targetType = GetReturnTypeFromInstruction(arguments[0]) ?? rootType; if (targetType == null) return false; - return targetType.GetAllBaseTypes().Any(i => i.IsKnownType(KnownTypeCode.IEnumerable) || i.IsKnownType(KnownTypeCode.IEnumerableOfT)); + if (!targetType.GetAllBaseTypes().Any(i => i.IsKnownType(KnownTypeCode.IEnumerable) || i.IsKnownType(KnownTypeCode.IEnumerableOfT))) + return false; + return CSharp.Transforms.IntroduceExtensionMethods.CanInferTypeArgumentsFromParameters(method, method.Parameters.SelectArray(p => new ResolveResult(p.Type)), resolveContext); } static IType GetReturnTypeFromInstruction(ILInstruction instruction)