diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.cs index feaa04a68..e74cb4314 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.cs @@ -19,3 +19,4 @@ using System; [assembly: CLSCompliant(false)] +//[module: CLSCompliant(false)] \ No newline at end of file diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.il new file mode 100644 index 000000000..15525b973 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.il @@ -0,0 +1,30 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly AssemblyCustomAttributes +{ + .custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 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. + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module AssemblyCustomAttributes.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.il new file mode 100644 index 000000000..bb824448d --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.il @@ -0,0 +1,30 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly AssemblyCustomAttributes.opt +{ + .custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 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. + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module AssemblyCustomAttributes.opt.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.roslyn.il new file mode 100644 index 000000000..5a38fbc29 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.roslyn.il @@ -0,0 +1,34 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly AssemblyCustomAttributes +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) + + .custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module AssemblyCustomAttributes.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.roslyn.il new file mode 100644 index 000000000..e4db81088 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.roslyn.il @@ -0,0 +1,34 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly AssemblyCustomAttributes +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) + + .custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module AssemblyCustomAttributes.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.cs index 1cce091da..e007d15ef 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.cs @@ -16,48 +16,45 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$CS using System; -//$CE -//$$ TargetModule (ignored) -//[module: CLSCompliantAttribute(false)] -//$$ ParameterlessAttributeUsage -namespace ParameterLessAttributeUsage +namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples { + [Obsolete("reason")] + public delegate int AppliedToDelegate(); + + [Obsolete("reason")] + public interface AppliedToInterface + { + } + + [Obsolete("reason")] + public struct AppliedToStruct + { + public int Field; + } + [Flags] public enum EnumWithFlagsAttribute { None = 0x0 } -} -//$$ AttributeWithEnumArgument -namespace AttributeWithEnumArgument -{ + [AttributeUsage(AttributeTargets.All)] public class MyAttributeAttribute : Attribute { } -} -//$$ AttributeWithEnumExpressionArgument -namespace AttributeWithEnumExpressionArgument -{ + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface)] - public class MyAttributeAttribute : Attribute + public class MyMethodOrInterfaceAttributeAttribute : Attribute { } -} -//$$ AttributeWithStringExpressionArgument -namespace AttributeWithStringExpressionArgument -{ + [Obsolete("message")] - public class ObsoletedClass + public class ObsoleteClass { } -} -//$$ AttributeWithTypeArgument -namespace AttributeWithTypeArgument -{ + [AttributeUsage(AttributeTargets.All)] public class MyTypeAttribute : Attribute { @@ -70,255 +67,125 @@ namespace AttributeWithTypeArgument public class SomeClass { } -} -//$$ AppliedToEvent -namespace AppliedToEvent -{ - [AttributeUsage(AttributeTargets.Event)] - public class MyAttributeAttribute : Attribute - { - } - public class TestClass - { - [MyAttribute] - public event EventHandler MyEvent; - } -} -//$$ AppliedToEventMethods -namespace AppliedToEventMethods -{ - [AttributeUsage(AttributeTargets.Method)] - public class MyAttributeAttribute : Attribute - { - } - public class TestClass - { - [method: MyAttribute] - public event EventHandler MyEvent; - } -} -//$$ AppliedToField -namespace AppliedToField -{ - [AttributeUsage(AttributeTargets.Field)] - public class MyAttributeAttribute : Attribute - { - } + public class TestClass { [MyAttribute] public int Field; - } -} -//$$ AppliedToProperty -namespace AppliedToProperty -{ - public class TestClass - { + [Obsolete("reason")] - public int Property - { - get - { + public int Property { + get { return 0; } } - } -} -//$$ AppliedToPropertyGet -namespace AppliedToPropertyGet -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class TestClass - { - public int Property - { + + public int PropertyAttributeOnGetter { [MyAttribute] - get - { + get { return 0; } } - } -} -//$$ AppliedToPropertySet -namespace AppliedToPropertySet -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class TestClass - { - public int Property - { - get - { + + public int PropertyAttributeOnSetter { + get { return 3; } [MyAttribute] - set - { + set { } } - } -} -//$$ AppliedToIndexer -namespace AppliedToIndexer -{ - public class TestClass - { + [Obsolete("reason")] - public int this[int i] - { - get - { + public int this[int i] { + get { return 0; } } - } -} -//$$ AppliedToDelegate -[Obsolete("reason")] -public delegate int AppliedToDelegate(); -//$$ AppliedToMethod -namespace AppliedToMethod -{ - [AttributeUsage(AttributeTargets.Method)] - public class MyAttributeAttribute : Attribute - { - } - public class TestClass - { + + [MyAttribute] + public event EventHandler MyEvent; + + [method: MyAttribute] + public event EventHandler MyEvent2; + [MyAttribute] public void Method() { } - } -} -//$$ AppliedToInterface -[Obsolete("reason")] -public interface AppliedToInterface -{ -} -//$$ AppliedToStruct -[Obsolete("reason")] -public struct AppliedToStruct -{ - public int Field; -} -//$$ AppliedToParameter -namespace AppliedToParameter -{ - [AttributeUsage(AttributeTargets.Parameter)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass - { + public void Method([MyAttribute] int val) { } } -} -//$$ NamedInitializerProperty -namespace NamedInitializerProperty -{ + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - public class MyAttributeAttribute : Attribute + public class MyAttributeWithNamedArgumentAppliedAttribute : Attribute { } -} -//$$ NamedInitializerPropertyString -namespace NamedInitializerPropertyString -{ + [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + public class MyAttributeWithCustomPropertyAttribute : Attribute { - public string Prop - { - get - { + public string Prop { + get { return ""; } - set - { + set { } } } - [MyAttribute(Prop = "value")] + + [MyAttributeWithCustomProperty(Prop = "value")] public class MyClass { } -} -//$$ NamedInitializerPropertyType -namespace NamedInitializerPropertyType -{ + [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + public class MyAttributeWithNamedInitializerPropertyTypeAttribute : Attribute { - public Type Prop - { - get - { + public Type Prop { + get { return null; } - set - { + set { } } } - [MyAttribute(Prop = typeof(Enum))] - public class MyClass + + [MyAttributeWithNamedInitializerPropertyType(Prop = typeof(Enum))] + public class MyClass2 { } -} -//$$ NamedInitializerPropertyEnum -namespace NamedInitializerPropertyEnum -{ + [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + public class MyAttributeNamedInitializerPropertyEnumAttribute : Attribute { - public AttributeTargets Prop - { - get - { + public AttributeTargets Prop { + get { return AttributeTargets.All; } - set - { + set { } } } - [MyAttribute(Prop = (AttributeTargets.Class | AttributeTargets.Method))] - public class MyClass + + [MyAttributeNamedInitializerPropertyEnum(Prop = (AttributeTargets.Class | AttributeTargets.Method))] + public class MyClass3 { } -} -//$$ NamedInitializerFieldEnum -namespace NamedInitializerFieldEnum -{ + [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + public class MyAttributeNamedInitializerFieldEnumAttribute : Attribute { public AttributeTargets Field; } - [MyAttribute(Field = (AttributeTargets.Class | AttributeTargets.Method))] - public class MyClass + [MyAttributeNamedInitializerFieldEnum(Field = (AttributeTargets.Class | AttributeTargets.Method))] + public class MyClass4 { } -} -//$$ TargetReturn -namespace TargetReturn -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + public class MyClass5 { [return: MyAttribute] public int MyMethod() @@ -326,183 +193,111 @@ namespace TargetReturn return 5; } } -} -//$$ TargetPropertyGetReturn -namespace TargetPropertyGetReturn -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + + public class MyClass6 { - public int Prop - { + public int Prop { [return: MyAttribute] - get - { + get { return 3; } } } -} -//$$ TargetPropertySetParam -namespace TargetPropertySetParam -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + public class MyClass7 { - public int Prop - { + public int Prop { [param: MyAttribute] - set - { + set { } } } -} -//$$ TargetPropertySetReturn -namespace TargetPropertySetReturn -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + + public class MyClass8 { - public int Prop - { - get - { + public int Prop { + get { return 3; } [return: MyAttribute] - set - { + set { } } } -} -//$$ TargetPropertyIndexGetReturn -namespace TargetPropertyIndexGetReturn -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + + public class MyClass9 { - public int this[string s] - { + public int this[string s] { [return: MyAttribute] - get - { + get { return 3; } } } -} -//$$ TargetPropertyIndexParamOnlySet -namespace TargetPropertyIndexParamOnlySet -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + + public class MyClass10 { - public int this[[MyAttribute] string s] - { - set - { + public int this[[MyAttribute] string s] { + set { } } } -} -//$$ TargetPropertyIndexParamOnlyGet -namespace TargetPropertyIndexParamOnlyGet -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + + public class MyClass11 { - public int this[[MyAttribute] string s] - { - get - { + public int this[[MyAttribute] string s] { + get { return 3; } } } -} -//$$ TargetPropertyIndexSetReturn -namespace TargetPropertyIndexSetReturn -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute - { - } - public class MyClass + + public class MyClass12 { - public string this[int index] - { - get - { + public string this[int index] { + get { return ""; } [return: MyAttribute] - set - { + set { } } } -} -//$$ TargetPropertyIndexSetMultiParam -namespace TargetPropertyIndexSetMultiParam -{ + [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + public class MyAttributeTargetPropertyIndexSetMultiParamAttribute : Attribute { public int Field; } - public class MyClass + public class MyClass13 { - public string this[[MyAttribute(Field = 2)] int index1, [MyAttribute(Field = 3)] int index2] - { - get - { + public string this[[MyAttributeTargetPropertyIndexSetMultiParam(Field = 2)] int index1, [MyAttributeTargetPropertyIndexSetMultiParam(Field = 3)] int index2] { + get { return ""; } [param: MyAttribute] - set - { + set { } } } -} -//$$ ClassAttributeOnTypeParameter -namespace ClassAttributeOnTypeParameter -{ [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + public class MyAttributeOnReturnTypeOfDelegateAttribute : Attribute { } - public class MyClass<[MyAttribute] T> + [return: MyAttributeOnReturnTypeOfDelegate] + public delegate void Test(); + + [AttributeUsage(AttributeTargets.All)] + public class MyClassAttributeOnTypeParameterAttribute : Attribute { } -} -//$$ AttributeOnReturnTypeOfDelegate -namespace AttributeOnReturnTypeOfDelegate -{ - [AttributeUsage(AttributeTargets.All)] - public class MyAttributeAttribute : Attribute + + public class MyClass<[MyClassAttributeOnTypeParameter] T> { } - [return: MyAttribute] - public delegate void Test(); -} +} \ No newline at end of file diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.il new file mode 100644 index 000000000..11e2fdf82 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.il @@ -0,0 +1,1193 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributeSamples +{ + .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. + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributeSamples.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + extends [mscorlib]System.MulticastDelegate +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method AppliedToDelegate::.ctor + + .method public hidebysig newslot virtual + instance int32 Invoke() runtime managed + { + } // end of method AppliedToDelegate::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method AppliedToDelegate::BeginInvoke + + .method public hidebysig newslot virtual + instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + } // end of method AppliedToDelegate::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + +.class interface public abstract auto ansi ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface + +.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + extends [mscorlib]System.ValueType +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .field public int32 Field +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + extends [mscorlib]System.Enum +{ + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute None = int32(0x00000000) +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 04 00 00 00 00 ) // ..@..... + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyMethodOrInterfaceAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 07 6D 65 73 73 61 67 65 00 00 ) // ...message.. + .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 ObsoleteClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type t) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: nop + IL_0007: nop + IL_0008: nop + IL_0009: ret + } // end of method MyTypeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5D 53 79 73 74 65 6D 2E 41 74 74 72 69 62 // ..]System.Attrib + 75 74 65 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // ute, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 00 00 ) + .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 SomeClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + 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 int32 Field + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .field private class [mscorlib]System.EventHandler MyEvent + .field private class [mscorlib]System.EventHandler MyEvent2 + .method public hidebysig specialname instance int32 + get_Property() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_Property + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnGetter() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_PropertyAttributeOnGetter + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnSetter() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_PropertyAttributeOnSetter + + .method public hidebysig specialname instance void + set_PropertyAttributeOnSetter(int32 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method TestClass::set_PropertyAttributeOnSetter + + .method public hidebysig specialname instance int32 + get_Item(int32 i) cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_Item + + .method public hidebysig specialname instance void + add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + // Code size 48 (0x30) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + class [mscorlib]System.EventHandler V_1, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: ceq + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brtrue.s IL_0007 + + IL_002f: ret + } // end of method TestClass::add_MyEvent + + .method public hidebysig specialname instance void + remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + // Code size 48 (0x30) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + class [mscorlib]System.EventHandler V_1, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: ceq + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brtrue.s IL_0007 + + IL_002f: ret + } // end of method TestClass::remove_MyEvent + + .method public hidebysig specialname instance void + add_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + class [mscorlib]System.EventHandler V_1, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: ceq + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brtrue.s IL_0007 + + IL_002f: ret + } // end of method TestClass::add_MyEvent2 + + .method public hidebysig specialname instance void + remove_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + class [mscorlib]System.EventHandler V_1, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: ceq + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brtrue.s IL_0007 + + IL_002f: ret + } // end of method TestClass::remove_MyEvent2 + + .method public hidebysig instance void + Method() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method TestClass::Method + + .method public hidebysig instance void + Method(int32 val) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method TestClass::Method + + .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 TestClass::.ctor + + .event [mscorlib]System.EventHandler MyEvent + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent + .event [mscorlib]System.EventHandler MyEvent2 + { + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent2(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent2(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent2 + .property instance int32 Property() + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Property() + } // end of property TestClass::Property + .property instance int32 PropertyAttributeOnGetter() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnGetter() + } // end of property TestClass::PropertyAttributeOnGetter + .property instance int32 PropertyAttributeOnSetter() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::set_PropertyAttributeOnSetter(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnSetter() + } // end of property TestClass::PropertyAttributeOnSetter + .property instance int32 Item(int32) + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Item(int32) + } // end of property TestClass::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 00 00 00 01 00 54 02 0D 41 6C 6C 6F 77 // ..@.....T..Allow + 4D 75 6C 74 69 70 6C 65 01 ) // Multiple. + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithNamedArgumentAppliedAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance string + get_Prop() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyAttributeWithCustomPropertyAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(string 'value') cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyAttributeWithCustomPropertyAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithCustomPropertyAttribute::.ctor + + .property instance string Prop() + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::set_Prop(string) + } // end of property MyAttributeWithCustomPropertyAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::.ctor() = ( 01 00 01 00 54 0E 04 50 72 6F 70 05 76 61 6C 75 // ....T..Prop.valu + 65 ) // e + .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 MyClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance class [mscorlib]System.Type + get_Prop() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (class [mscorlib]System.Type V_0) + IL_0000: nop + IL_0001: ldnull + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(class [mscorlib]System.Type 'value') cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor + + .property instance class [mscorlib]System.Type + Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop(class [mscorlib]System.Type) + .get instance class [mscorlib]System.Type ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop() + } // end of property MyAttributeWithNamedInitializerPropertyTypeAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor() = ( 01 00 01 00 54 50 04 50 72 6F 70 58 53 79 73 74 // ....TP.PropXSyst + 65 6D 2E 45 6E 75 6D 2C 20 6D 73 63 6F 72 6C 69 // em.Enum, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 ) // e089 + .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 MyClass2::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance valuetype [mscorlib]System.AttributeTargets + get_Prop() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (valuetype [mscorlib]System.AttributeTargets V_0) + IL_0000: nop + IL_0001: ldc.i4 0x7fff + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(valuetype [mscorlib]System.AttributeTargets 'value') cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::.ctor + + .property instance valuetype [mscorlib]System.AttributeTargets + Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop(valuetype [mscorlib]System.AttributeTargets) + .get instance valuetype [mscorlib]System.AttributeTargets ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop() + } // end of property MyAttributeNamedInitializerPropertyEnumAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::.ctor() = ( 01 00 01 00 54 55 64 53 79 73 74 65 6D 2E 41 74 // ....TUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 04 50 72 6F 70 // c561934e089.Prop + 44 00 00 00 ) // D... + .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 MyClass3::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public valuetype [mscorlib]System.AttributeTargets Field + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeNamedInitializerFieldEnumAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute::.ctor() = ( 01 00 01 00 53 55 64 53 79 73 74 65 6D 2E 41 74 // ....SUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 05 46 69 65 6C // c561934e089.Fiel + 64 44 00 00 00 ) // dD... + .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 MyClass4::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + extends [mscorlib]System.Object +{ + .method public hidebysig instance int32 + MyMethod() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.5 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass5::MyMethod + + .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 MyClass5::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass6::get_Prop + + .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 MyClass6::.ctor + + .property instance int32 Prop() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6::get_Prop() + } // end of property MyClass6::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass7::set_Prop + + .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 MyClass7::.ctor + + .property instance int32 Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7::set_Prop(int32) + } // end of property MyClass7::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass8::get_Prop + + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass8::set_Prop + + .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 MyClass8::.ctor + + .property instance int32 Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::set_Prop(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::get_Prop() + } // end of property MyClass8::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass9::get_Item + + .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 MyClass9::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9::get_Item(string) + } // end of property MyClass9::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance void + set_Item(string s, + int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass10::set_Item + + .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 MyClass10::.ctor + + .property instance int32 Item(string) + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10::set_Item(string, + int32) + } // end of property MyClass10::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass11::get_Item + + .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 MyClass11::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11::get_Item(string) + } // end of property MyClass11::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index) cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyClass12::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index, + string 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass12::set_Item + + .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 MyClass12::.ctor + + .property instance string Item(int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::set_Item(int32, + string) + } // end of property MyClass12::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public int32 Field + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index1, + int32 index2) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyClass13::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index1, + int32 index2, + string 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + .param [3] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass13::set_Item + + .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 MyClass13::.ctor + + .property instance string Item(int32, + int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::get_Item(int32, + int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::set_Item(int32, + int32, + string) + } // end of property MyClass13::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeOnReturnTypeOfDelegateAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + extends [mscorlib]System.MulticastDelegate +{ + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method Test::.ctor + + .method public hidebysig newslot virtual + instance void Invoke() runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method Test::BeginInvoke + + .method public hidebysig newslot virtual + instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyClassAttributeOnTypeParameterAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + extends [mscorlib]System.Object +{ + .param type T + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute::.ctor() = ( 01 00 00 00 ) + .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 MyClass`1::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.il new file mode 100644 index 000000000..24176f4a6 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.il @@ -0,0 +1,1071 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributeSamples.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.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 + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributeSamples.opt.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + extends [mscorlib]System.MulticastDelegate +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method AppliedToDelegate::.ctor + + .method public hidebysig newslot virtual + instance int32 Invoke() runtime managed + { + } // end of method AppliedToDelegate::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method AppliedToDelegate::BeginInvoke + + .method public hidebysig newslot virtual + instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + } // end of method AppliedToDelegate::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + +.class interface public abstract auto ansi ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface + +.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + extends [mscorlib]System.ValueType +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .field public int32 Field +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + extends [mscorlib]System.Enum +{ + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute None = int32(0x00000000) +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 04 00 00 00 00 ) // ..@..... + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyMethodOrInterfaceAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 07 6D 65 73 73 61 67 65 00 00 ) // ...message.. + .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 ObsoleteClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type t) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: ret + } // end of method MyTypeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5D 53 79 73 74 65 6D 2E 41 74 74 72 69 62 // ..]System.Attrib + 75 74 65 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // ute, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 00 00 ) + .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 SomeClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + 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 int32 Field + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .field private class [mscorlib]System.EventHandler MyEvent + .field private class [mscorlib]System.EventHandler MyEvent2 + .method public hidebysig specialname instance int32 + get_Property() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method TestClass::get_Property + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnGetter() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method TestClass::get_PropertyAttributeOnGetter + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnSetter() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method TestClass::get_PropertyAttributeOnSetter + + .method public hidebysig specialname instance void + set_PropertyAttributeOnSetter(int32 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method TestClass::set_PropertyAttributeOnSetter + + .method public hidebysig specialname instance int32 + get_Item(int32 i) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method TestClass::get_Item + + .method public hidebysig specialname instance void + add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::add_MyEvent + + .method public hidebysig specialname instance void + remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::remove_MyEvent + + .method public hidebysig specialname instance void + add_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::add_MyEvent2 + + .method public hidebysig specialname instance void + remove_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::remove_MyEvent2 + + .method public hidebysig instance void + Method() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method TestClass::Method + + .method public hidebysig instance void + Method(int32 val) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method TestClass::Method + + .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 TestClass::.ctor + + .event [mscorlib]System.EventHandler MyEvent + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent + .event [mscorlib]System.EventHandler MyEvent2 + { + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent2(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent2(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent2 + .property instance int32 Property() + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Property() + } // end of property TestClass::Property + .property instance int32 PropertyAttributeOnGetter() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnGetter() + } // end of property TestClass::PropertyAttributeOnGetter + .property instance int32 PropertyAttributeOnSetter() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::set_PropertyAttributeOnSetter(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnSetter() + } // end of property TestClass::PropertyAttributeOnSetter + .property instance int32 Item(int32) + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Item(int32) + } // end of property TestClass::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 00 00 00 01 00 54 02 0D 41 6C 6C 6F 77 // ..@.....T..Allow + 4D 75 6C 74 69 70 6C 65 01 ) // Multiple. + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithNamedArgumentAppliedAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance string + get_Prop() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "" + IL_0005: ret + } // end of method MyAttributeWithCustomPropertyAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(string 'value') cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyAttributeWithCustomPropertyAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithCustomPropertyAttribute::.ctor + + .property instance string Prop() + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::set_Prop(string) + } // end of property MyAttributeWithCustomPropertyAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::.ctor() = ( 01 00 01 00 54 0E 04 50 72 6F 70 05 76 61 6C 75 // ....T..Prop.valu + 65 ) // e + .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 MyClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance class [mscorlib]System.Type + get_Prop() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(class [mscorlib]System.Type 'value') cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor + + .property instance class [mscorlib]System.Type + Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop(class [mscorlib]System.Type) + .get instance class [mscorlib]System.Type ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop() + } // end of property MyAttributeWithNamedInitializerPropertyTypeAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor() = ( 01 00 01 00 54 50 04 50 72 6F 70 58 53 79 73 74 // ....TP.PropXSyst + 65 6D 2E 45 6E 75 6D 2C 20 6D 73 63 6F 72 6C 69 // em.Enum, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 ) // e089 + .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 MyClass2::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance valuetype [mscorlib]System.AttributeTargets + get_Prop() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldc.i4 0x7fff + IL_0005: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(valuetype [mscorlib]System.AttributeTargets 'value') cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::.ctor + + .property instance valuetype [mscorlib]System.AttributeTargets + Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop(valuetype [mscorlib]System.AttributeTargets) + .get instance valuetype [mscorlib]System.AttributeTargets ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop() + } // end of property MyAttributeNamedInitializerPropertyEnumAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::.ctor() = ( 01 00 01 00 54 55 64 53 79 73 74 65 6D 2E 41 74 // ....TUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 04 50 72 6F 70 // c561934e089.Prop + 44 00 00 00 ) // D... + .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 MyClass3::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public valuetype [mscorlib]System.AttributeTargets Field + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeNamedInitializerFieldEnumAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute::.ctor() = ( 01 00 01 00 53 55 64 53 79 73 74 65 6D 2E 41 74 // ....SUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 05 46 69 65 6C // c561934e089.Fiel + 64 44 00 00 00 ) // dD... + .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 MyClass4::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + extends [mscorlib]System.Object +{ + .method public hidebysig instance int32 + MyMethod() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.5 + IL_0001: ret + } // end of method MyClass5::MyMethod + + .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 MyClass5::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass6::get_Prop + + .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 MyClass6::.ctor + + .property instance int32 Prop() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6::get_Prop() + } // end of property MyClass6::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass7::set_Prop + + .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 MyClass7::.ctor + + .property instance int32 Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7::set_Prop(int32) + } // end of property MyClass7::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass8::get_Prop + + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass8::set_Prop + + .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 MyClass8::.ctor + + .property instance int32 Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::set_Prop(int32) + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::get_Prop() + } // end of property MyClass8::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass9::get_Item + + .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 MyClass9::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9::get_Item(string) + } // end of property MyClass9::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance void + set_Item(string s, + int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass10::set_Item + + .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 MyClass10::.ctor + + .property instance int32 Item(string) + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10::set_Item(string, + int32) + } // end of property MyClass10::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass11::get_Item + + .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 MyClass11::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11::get_Item(string) + } // end of property MyClass11::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index) cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "" + IL_0005: ret + } // end of method MyClass12::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index, + string 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass12::set_Item + + .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 MyClass12::.ctor + + .property instance string Item(int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::set_Item(int32, + string) + } // end of property MyClass12::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public int32 Field + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index1, + int32 index2) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "" + IL_0005: ret + } // end of method MyClass13::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index1, + int32 index2, + string 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + .param [3] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass13::set_Item + + .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 MyClass13::.ctor + + .property instance string Item(int32, + int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::get_Item(int32, + int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::set_Item(int32, + int32, + string) + } // end of property MyClass13::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeOnReturnTypeOfDelegateAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + extends [mscorlib]System.MulticastDelegate +{ + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method Test::.ctor + + .method public hidebysig newslot virtual + instance void Invoke() runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method Test::BeginInvoke + + .method public hidebysig newslot virtual + instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyClassAttributeOnTypeParameterAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + extends [mscorlib]System.Object +{ + .param type T + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute::.ctor() = ( 01 00 00 00 ) + .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 MyClass`1::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.roslyn.il new file mode 100644 index 000000000..38561e911 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.roslyn.il @@ -0,0 +1,1081 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributeSamples +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) + + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributeSamples.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + extends [mscorlib]System.MulticastDelegate +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method AppliedToDelegate::.ctor + + .method public hidebysig newslot virtual + instance int32 Invoke() runtime managed + { + } // end of method AppliedToDelegate::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method AppliedToDelegate::BeginInvoke + + .method public hidebysig newslot virtual + instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + } // end of method AppliedToDelegate::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + +.class interface public abstract auto ansi ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface + +.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + extends [mscorlib]System.ValueType +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .field public int32 Field +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + extends [mscorlib]System.Enum +{ + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute None = int32(0x00000000) +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 04 00 00 00 00 ) // ..@..... + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyMethodOrInterfaceAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 07 6D 65 73 73 61 67 65 00 00 ) // ...message.. + .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 ObsoleteClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type t) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: ret + } // end of method MyTypeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5D 53 79 73 74 65 6D 2E 41 74 74 72 69 62 // ..]System.Attrib + 75 74 65 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // ute, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 00 00 ) + .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 SomeClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + 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 int32 Field + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .field private class [mscorlib]System.EventHandler MyEvent + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private class [mscorlib]System.EventHandler MyEvent2 + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig specialname instance int32 + get_Property() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method TestClass::get_Property + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnGetter() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method TestClass::get_PropertyAttributeOnGetter + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnSetter() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method TestClass::get_PropertyAttributeOnSetter + + .method public hidebysig specialname instance void + set_PropertyAttributeOnSetter(int32 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method TestClass::set_PropertyAttributeOnSetter + + .method public hidebysig specialname instance int32 + get_Item(int32 i) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method TestClass::get_Item + + .method public hidebysig specialname instance void + add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::add_MyEvent + + .method public hidebysig specialname instance void + remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::remove_MyEvent + + .method public hidebysig specialname instance void + add_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::add_MyEvent2 + + .method public hidebysig specialname instance void + remove_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::remove_MyEvent2 + + .method public hidebysig instance void + Method() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method TestClass::Method + + .method public hidebysig instance void + Method(int32 val) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method TestClass::Method + + .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 TestClass::.ctor + + .event [mscorlib]System.EventHandler MyEvent + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent + .event [mscorlib]System.EventHandler MyEvent2 + { + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent2(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent2(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent2 + .property instance int32 Property() + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Property() + } // end of property TestClass::Property + .property instance int32 PropertyAttributeOnGetter() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnGetter() + } // end of property TestClass::PropertyAttributeOnGetter + .property instance int32 PropertyAttributeOnSetter() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnSetter() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::set_PropertyAttributeOnSetter(int32) + } // end of property TestClass::PropertyAttributeOnSetter + .property instance int32 Item(int32) + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Item(int32) + } // end of property TestClass::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 00 00 00 01 00 54 02 0D 41 6C 6C 6F 77 // ..@.....T..Allow + 4D 75 6C 74 69 70 6C 65 01 ) // Multiple. + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithNamedArgumentAppliedAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance string + get_Prop() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "" + IL_0005: ret + } // end of method MyAttributeWithCustomPropertyAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(string 'value') cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyAttributeWithCustomPropertyAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithCustomPropertyAttribute::.ctor + + .property instance string Prop() + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::set_Prop(string) + } // end of property MyAttributeWithCustomPropertyAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::.ctor() = ( 01 00 01 00 54 0E 04 50 72 6F 70 05 76 61 6C 75 // ....T..Prop.valu + 65 ) // e + .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 MyClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance class [mscorlib]System.Type + get_Prop() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(class [mscorlib]System.Type 'value') cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor + + .property instance class [mscorlib]System.Type + Prop() + { + .get instance class [mscorlib]System.Type ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop(class [mscorlib]System.Type) + } // end of property MyAttributeWithNamedInitializerPropertyTypeAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor() = ( 01 00 01 00 54 50 04 50 72 6F 70 58 53 79 73 74 // ....TP.PropXSyst + 65 6D 2E 45 6E 75 6D 2C 20 6D 73 63 6F 72 6C 69 // em.Enum, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 ) // e089 + .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 MyClass2::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance valuetype [mscorlib]System.AttributeTargets + get_Prop() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldc.i4 0x7fff + IL_0005: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(valuetype [mscorlib]System.AttributeTargets 'value') cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::.ctor + + .property instance valuetype [mscorlib]System.AttributeTargets + Prop() + { + .get instance valuetype [mscorlib]System.AttributeTargets ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop(valuetype [mscorlib]System.AttributeTargets) + } // end of property MyAttributeNamedInitializerPropertyEnumAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::.ctor() = ( 01 00 01 00 54 55 64 53 79 73 74 65 6D 2E 41 74 // ....TUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 04 50 72 6F 70 // c561934e089.Prop + 44 00 00 00 ) // D... + .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 MyClass3::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public valuetype [mscorlib]System.AttributeTargets Field + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeNamedInitializerFieldEnumAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute::.ctor() = ( 01 00 01 00 53 55 64 53 79 73 74 65 6D 2E 41 74 // ....SUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 05 46 69 65 6C // c561934e089.Fiel + 64 44 00 00 00 ) // dD... + .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 MyClass4::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + extends [mscorlib]System.Object +{ + .method public hidebysig instance int32 + MyMethod() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.5 + IL_0001: ret + } // end of method MyClass5::MyMethod + + .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 MyClass5::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass6::get_Prop + + .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 MyClass6::.ctor + + .property instance int32 Prop() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6::get_Prop() + } // end of property MyClass6::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass7::set_Prop + + .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 MyClass7::.ctor + + .property instance int32 Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7::set_Prop(int32) + } // end of property MyClass7::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass8::get_Prop + + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass8::set_Prop + + .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 MyClass8::.ctor + + .property instance int32 Prop() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::set_Prop(int32) + } // end of property MyClass8::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass9::get_Item + + .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 MyClass9::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9::get_Item(string) + } // end of property MyClass9::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance void + set_Item(string s, + int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass10::set_Item + + .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 MyClass10::.ctor + + .property instance int32 Item(string) + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10::set_Item(string, + int32) + } // end of property MyClass10::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.3 + IL_0001: ret + } // end of method MyClass11::get_Item + + .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 MyClass11::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11::get_Item(string) + } // end of property MyClass11::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index) cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "" + IL_0005: ret + } // end of method MyClass12::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index, + string 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass12::set_Item + + .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 MyClass12::.ctor + + .property instance string Item(int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::set_Item(int32, + string) + } // end of property MyClass12::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public int32 Field + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index1, + int32 index2) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "" + IL_0005: ret + } // end of method MyClass13::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index1, + int32 index2, + string 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + .param [3] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method MyClass13::set_Item + + .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 MyClass13::.ctor + + .property instance string Item(int32, + int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::get_Item(int32, + int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::set_Item(int32, + int32, + string) + } // end of property MyClass13::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttributeOnReturnTypeOfDelegateAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + extends [mscorlib]System.MulticastDelegate +{ + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method Test::.ctor + + .method public hidebysig newslot virtual + instance void Invoke() runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method Test::BeginInvoke + + .method public hidebysig newslot virtual + instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: ret + } // end of method MyClassAttributeOnTypeParameterAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + extends [mscorlib]System.Object +{ + .param type T + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute::.ctor() = ( 01 00 00 00 ) + .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 MyClass`1::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.roslyn.il new file mode 100644 index 000000000..862153c4b --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.roslyn.il @@ -0,0 +1,1207 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributeSamples +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) + + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributeSamples.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + extends [mscorlib]System.MulticastDelegate +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method AppliedToDelegate::.ctor + + .method public hidebysig newslot virtual + instance int32 Invoke() runtime managed + { + } // end of method AppliedToDelegate::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method AppliedToDelegate::BeginInvoke + + .method public hidebysig newslot virtual + instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + } // end of method AppliedToDelegate::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToDelegate + +.class interface public abstract auto ansi ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToInterface + +.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + extends [mscorlib]System.ValueType +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .field public int32 Field +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.AppliedToStruct + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + extends [mscorlib]System.Enum +{ + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute None = int32(0x00000000) +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.EnumWithFlagsAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 04 00 00 00 00 ) // ..@..... + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyMethodOrInterfaceAttributeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyMethodOrInterfaceAttributeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 07 6D 65 73 73 61 67 65 00 00 ) // ...message.. + .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 ObsoleteClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.ObsoleteClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type t) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: nop + IL_0007: nop + IL_0008: ret + } // end of method MyTypeAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyTypeAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5D 53 79 73 74 65 6D 2E 41 74 74 72 69 62 // ..]System.Attrib + 75 74 65 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // ute, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 00 00 ) + .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 SomeClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.SomeClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + 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 int32 Field + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .field private class [mscorlib]System.EventHandler MyEvent + .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 MyEvent2 + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 + get_Property() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_Property + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnGetter() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_PropertyAttributeOnGetter + + .method public hidebysig specialname instance int32 + get_PropertyAttributeOnSetter() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_PropertyAttributeOnSetter + + .method public hidebysig specialname instance void + set_PropertyAttributeOnSetter(int32 'value') cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method TestClass::set_PropertyAttributeOnSetter + + .method public hidebysig specialname instance int32 + get_Item(int32 i) cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method TestClass::get_Item + + .method public hidebysig specialname instance void + add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::add_MyEvent + + .method public hidebysig specialname instance void + remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::remove_MyEvent + + .method public hidebysig specialname instance void + add_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::add_MyEvent2 + + .method public hidebysig specialname instance void + remove_MyEvent2(class [mscorlib]System.EventHandler 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 3 + .locals init (class [mscorlib]System.EventHandler V_0, + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.1 + IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, + class [mscorlib]System.Delegate) + 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.CustomAttributeSamples.TestClass::MyEvent2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, + !!0, + !!0) + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.1 + IL_0026: bne.un.s IL_0007 + + IL_0028: ret + } // end of method TestClass::remove_MyEvent2 + + .method public hidebysig instance void + Method() cil managed + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method TestClass::Method + + .method public hidebysig instance void + Method(int32 val) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method TestClass::Method + + .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 TestClass::.ctor + + .event [mscorlib]System.EventHandler MyEvent + { + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent + .event [mscorlib]System.EventHandler MyEvent2 + { + .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::add_MyEvent2(class [mscorlib]System.EventHandler) + .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::remove_MyEvent2(class [mscorlib]System.EventHandler) + } // end of event TestClass::MyEvent2 + .property instance int32 Property() + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Property() + } // end of property TestClass::Property + .property instance int32 PropertyAttributeOnGetter() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnGetter() + } // end of property TestClass::PropertyAttributeOnGetter + .property instance int32 PropertyAttributeOnSetter() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_PropertyAttributeOnSetter() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::set_PropertyAttributeOnSetter(int32) + } // end of property TestClass::PropertyAttributeOnSetter + .property instance int32 Item(int32) + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 06 72 65 61 73 6F 6E 00 00 ) // ...reason.. + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass::get_Item(int32) + } // end of property TestClass::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.TestClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 00 00 00 01 00 54 02 0D 41 6C 6C 6F 77 // ..@.....T..Allow + 4D 75 6C 74 69 70 6C 65 01 ) // Multiple. + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeWithNamedArgumentAppliedAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedArgumentAppliedAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance string + get_Prop() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyAttributeWithCustomPropertyAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(string 'value') cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyAttributeWithCustomPropertyAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeWithCustomPropertyAttribute::.ctor + + .property instance string Prop() + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::set_Prop(string) + } // end of property MyAttributeWithCustomPropertyAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithCustomPropertyAttribute::.ctor() = ( 01 00 01 00 54 0E 04 50 72 6F 70 05 76 61 6C 75 // ....T..Prop.valu + 65 ) // e + .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 MyClass::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance class [mscorlib]System.Type + get_Prop() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (class [mscorlib]System.Type V_0) + IL_0000: nop + IL_0001: ldnull + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(class [mscorlib]System.Type 'value') cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor + + .property instance class [mscorlib]System.Type + Prop() + { + .get instance class [mscorlib]System.Type ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::set_Prop(class [mscorlib]System.Type) + } // end of property MyAttributeWithNamedInitializerPropertyTypeAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeWithNamedInitializerPropertyTypeAttribute::.ctor() = ( 01 00 01 00 54 50 04 50 72 6F 70 58 53 79 73 74 // ....TP.PropXSyst + 65 6D 2E 45 6E 75 6D 2C 20 6D 73 63 6F 72 6C 69 // em.Enum, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 ) // e089 + .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 MyClass2::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass2 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname instance valuetype [mscorlib]System.AttributeTargets + get_Prop() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (valuetype [mscorlib]System.AttributeTargets V_0) + IL_0000: nop + IL_0001: ldc.i4 0x7fff + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop + + .method public hidebysig specialname instance void + set_Prop(valuetype [mscorlib]System.AttributeTargets 'value') cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop + + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeNamedInitializerPropertyEnumAttribute::.ctor + + .property instance valuetype [mscorlib]System.AttributeTargets + Prop() + { + .get instance valuetype [mscorlib]System.AttributeTargets ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::set_Prop(valuetype [mscorlib]System.AttributeTargets) + } // end of property MyAttributeNamedInitializerPropertyEnumAttribute::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerPropertyEnumAttribute::.ctor() = ( 01 00 01 00 54 55 64 53 79 73 74 65 6D 2E 41 74 // ....TUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 04 50 72 6F 70 // c561934e089.Prop + 44 00 00 00 ) // D... + .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 MyClass3::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass3 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public valuetype [mscorlib]System.AttributeTargets Field + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeNamedInitializerFieldEnumAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + extends [mscorlib]System.Object +{ + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeNamedInitializerFieldEnumAttribute::.ctor() = ( 01 00 01 00 53 55 64 53 79 73 74 65 6D 2E 41 74 // ....SUdSystem.At + 74 72 69 62 75 74 65 54 61 72 67 65 74 73 2C 20 // tributeTargets, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 05 46 69 65 6C // c561934e089.Fiel + 64 44 00 00 00 ) // dD... + .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 MyClass4::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass4 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + extends [mscorlib]System.Object +{ + .method public hidebysig instance int32 + MyMethod() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.5 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass5::MyMethod + + .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 MyClass5::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass5 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass6::get_Prop + + .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 MyClass6::.ctor + + .property instance int32 Prop() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6::get_Prop() + } // end of property MyClass6::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass6 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass7::set_Prop + + .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 MyClass7::.ctor + + .property instance int32 Prop() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7::set_Prop(int32) + } // end of property MyClass7::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass7 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + extends [mscorlib]System.Object +{ + .method public hidebysig specialname instance int32 + get_Prop() cil managed + { + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass8::get_Prop + + .method public hidebysig specialname instance void + set_Prop(int32 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass8::set_Prop + + .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 MyClass8::.ctor + + .property instance int32 Prop() + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::get_Prop() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8::set_Prop(int32) + } // end of property MyClass8::Prop +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass8 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass9::get_Item + + .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 MyClass9::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9::get_Item(string) + } // end of property MyClass9::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass9 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance void + set_Item(string s, + int32 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass10::set_Item + + .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 MyClass10::.ctor + + .property instance int32 Item(string) + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10::set_Item(string, + int32) + } // end of property MyClass10::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass10 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance int32 + get_Item(string s) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldc.i4.3 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method MyClass11::get_Item + + .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 MyClass11::.ctor + + .property instance int32 Item(string) + { + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11::get_Item(string) + } // end of property MyClass11::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass11 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index) cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyClass12::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index, + string 'value') cil managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass12::set_Item + + .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 MyClass12::.ctor + + .property instance string Item(int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::get_Item(int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12::set_Item(int32, + string) + } // end of property MyClass12::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass12 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .field public int32 Field + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. + .method public hidebysig specialname instance string + get_Item(int32 index1, + int32 index2) cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyClass13::get_Item + + .method public hidebysig specialname instance void + set_Item(int32 index1, + int32 index2, + string 'value') cil managed + { + .param [1] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 02 00 00 00 ) // ....S..Field.... + .param [2] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeTargetPropertyIndexSetMultiParamAttribute::.ctor() = ( 01 00 01 00 53 08 05 46 69 65 6C 64 03 00 00 00 ) // ....S..Field.... + .param [3] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method MyClass13::set_Item + + .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 MyClass13::.ctor + + .property instance string Item(int32, + int32) + { + .get instance string ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::get_Item(int32, + int32) + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13::set_Item(int32, + int32, + string) + } // end of property MyClass13::Item +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass13 + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyAttributeOnReturnTypeOfDelegateAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute + +.class public auto ansi sealed ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + extends [mscorlib]System.MulticastDelegate +{ + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method Test::.ctor + + .method public hidebysig newslot virtual + instance void Invoke() runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::Invoke + + .method public hidebysig newslot virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke(class [mscorlib]System.AsyncCallback callback, + object 'object') runtime managed + { + } // end of method Test::BeginInvoke + + .method public hidebysig newslot virtual + instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + .param [0] + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyAttributeOnReturnTypeOfDelegateAttribute::.ctor() = ( 01 00 00 00 ) + } // end of method Test::EndInvoke + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.Test + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + extends [mscorlib]System.Attribute +{ + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .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.Attribute::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MyClassAttributeOnTypeParameterAttribute::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + extends [mscorlib]System.Object +{ + .param type T + .custom instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClassAttributeOnTypeParameterAttribute::.ctor() = ( 01 00 00 00 ) + .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 MyClass`1::.ctor + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples.MyClass`1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.cs index 37dde3345..337ca7df2 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.cs @@ -91,10 +91,8 @@ namespace CustomAttributes [My(EnumWithFlag.Item1 | EnumWithFlag.Item2)] private static int field; [My(EnumWithFlag.All)] - public static string Property - { - get - { + public static string Property { + get { return "aa"; } } @@ -104,7 +102,7 @@ namespace CustomAttributes } // No Boxing [My(new StringComparison[] { - StringComparison.Ordinal, + StringComparison.Ordinal, StringComparison.CurrentCulture })] public static void EnumArray() @@ -112,7 +110,7 @@ namespace CustomAttributes } // Boxing of each array element [My(new object[] { - StringComparison.Ordinal, + StringComparison.Ordinal, StringComparison.CurrentCulture })] public static void BoxedEnumArray() diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.il new file mode 100644 index 000000000..f1696db65 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.il @@ -0,0 +1,349 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributes +{ + .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. + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributes.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested public EnumWithFlag + extends [mscorlib]System.Enum + { + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008) + } // end of class EnumWithFlag + + .class auto ansi nested public beforefieldinit MyAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(object val) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: nop + IL_0007: nop + IL_0008: nop + IL_0009: ret + } // end of method MyAttribute::.ctor + + } // end of class MyAttribute + + .class auto ansi sealed nested public ULongEnum + extends [mscorlib]System.Enum + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum. + FF FF FF FF FF FF FF 00 00 ) + .field public specialname rtspecialname uint64 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF) + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 ) + } // end of class ULongEnum + + .class auto ansi nested public beforefieldinit TypesAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type 'type') cil managed + { + // Code size 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: nop + IL_0007: nop + IL_0008: nop + IL_0009: ret + } // end of method TypesAttribute::.ctor + + } // end of class TypesAttribute + + .class auto ansi nested private beforefieldinit SomeType`1 + extends [mscorlib]System.Object + { + .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 SomeType`1::.ctor + + } // end of class SomeType`1 + + .class auto ansi nested private beforefieldinit SomeType`2 + extends [mscorlib]System.Object + { + .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 SomeType`2::.ctor + + } // end of class SomeType`2 + + .class sequential ansi sealed nested private beforefieldinit DataType + extends [mscorlib]System.ValueType + { + .field private int32 i + } // end of class DataType + + .field private static int32 typeattr_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32, + 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi + 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult + 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub + 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a + 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089.. + .field private static int32 typeattr_null + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 ) + .field private static int32 typeattr_list_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle + 63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L + 69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In + 74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve + 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C + 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral, + 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b + 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089. + 00 ) + .field private static int32 typeattr_list_unbound + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec + 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li + 73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib, + 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0, + 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral + 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken + 3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08 + 39 00 00 ) // 9.. + .field private static int32 typeattr_sometype_of_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu + 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib + 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[ + 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes + 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute + 73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType].. + .field private static int32 typeattr_sometype_of_datatype2 + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust + 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da + 74 61 54 79 70 65 5D 00 00 ) // taType].. + .field private static int32 typeattr_sometype_of_datatype_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys + 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor + 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0 + 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne + 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey + 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619 + 33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]].. + .field private static int32 typeattr_sometype_of_datatype_array_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S + 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]].. + .field private static int32 typeattr_sometype_of_nested_sometype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C + 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+ + 44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste + 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 5D 5D 00 00 ) // e089]].. + .field private static int32 typeattr_sometype_of_int_and_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D + 61 74 61 54 79 70 65 5D 00 00 ) // ataType].. + .field private static int32 typeattr_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[ + 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089.. + .field private static int32 typeattr_multidim_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[ + 2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 00 00 ) // e089.. + .field private static int32 'field' + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 03 00 00 00 00 00 ) // ag...... + .method public hidebysig specialname static + string get_Property() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "aa" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method CustomAttributes::get_Property + + .method public hidebysig static void ObsoletedMethod() cil managed + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. + 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::ObsoletedMethod + + .method public hidebysig static void EnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri + 6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms + 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version= + 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture + 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public + 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5 + 36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089....... + 00 00 00 00 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::EnumArray + + .method public hidebysig static void BoxedEnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem + 2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso + 6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089.. + 00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin + 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089...... + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::BoxedEnumArray + + .method public hidebysig static void BoxedLiteralsArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 10 00 00 00 08 01 00 00 00 09 02 00 // ...Q............ + 00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00 + 00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a + 00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?. + 00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text.. + 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::BoxedLiteralsArray + + .property string Property() + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 0F 00 00 00 00 00 ) // ag...... + .get string CustomAttributes.CustomAttributes::get_Property() + } // end of property CustomAttributes::Property +} // end of class CustomAttributes.CustomAttributes + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.il new file mode 100644 index 000000000..fd63a9ec3 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.il @@ -0,0 +1,333 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributes.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.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 + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributes.opt.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested public EnumWithFlag + extends [mscorlib]System.Enum + { + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008) + } // end of class EnumWithFlag + + .class auto ansi nested public beforefieldinit MyAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(object val) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttribute::.ctor + + } // end of class MyAttribute + + .class auto ansi sealed nested public ULongEnum + extends [mscorlib]System.Enum + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum. + FF FF FF FF FF FF FF 00 00 ) + .field public specialname rtspecialname uint64 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF) + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 ) + } // end of class ULongEnum + + .class auto ansi nested public beforefieldinit TypesAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type 'type') cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: ret + } // end of method TypesAttribute::.ctor + + } // end of class TypesAttribute + + .class auto ansi nested private beforefieldinit SomeType`1 + extends [mscorlib]System.Object + { + .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 SomeType`1::.ctor + + } // end of class SomeType`1 + + .class auto ansi nested private beforefieldinit SomeType`2 + extends [mscorlib]System.Object + { + .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 SomeType`2::.ctor + + } // end of class SomeType`2 + + .class sequential ansi sealed nested private beforefieldinit DataType + extends [mscorlib]System.ValueType + { + .field private int32 i + } // end of class DataType + + .field private static int32 typeattr_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32, + 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi + 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult + 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub + 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a + 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089.. + .field private static int32 typeattr_null + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 ) + .field private static int32 typeattr_list_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle + 63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L + 69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In + 74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve + 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C + 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral, + 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b + 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089. + 00 ) + .field private static int32 typeattr_list_unbound + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec + 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li + 73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib, + 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0, + 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral + 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken + 3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08 + 39 00 00 ) // 9.. + .field private static int32 typeattr_sometype_of_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu + 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib + 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[ + 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes + 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute + 73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType].. + .field private static int32 typeattr_sometype_of_datatype2 + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust + 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da + 74 61 54 79 70 65 5D 00 00 ) // taType].. + .field private static int32 typeattr_sometype_of_datatype_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys + 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor + 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0 + 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne + 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey + 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619 + 33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]].. + .field private static int32 typeattr_sometype_of_datatype_array_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S + 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]].. + .field private static int32 typeattr_sometype_of_nested_sometype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C + 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+ + 44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste + 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 5D 5D 00 00 ) // e089]].. + .field private static int32 typeattr_sometype_of_int_and_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D + 61 74 61 54 79 70 65 5D 00 00 ) // ataType].. + .field private static int32 typeattr_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[ + 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089.. + .field private static int32 typeattr_multidim_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[ + 2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 00 00 ) // e089.. + .field private static int32 'field' + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 03 00 00 00 00 00 ) // ag...... + .method public hidebysig specialname static + string get_Property() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "aa" + IL_0005: ret + } // end of method CustomAttributes::get_Property + + .method public hidebysig static void ObsoletedMethod() cil managed + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. + 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::ObsoletedMethod + + .method public hidebysig static void EnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri + 6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms + 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version= + 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture + 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public + 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5 + 36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089....... + 00 00 00 00 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::EnumArray + + .method public hidebysig static void BoxedEnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem + 2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso + 6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089.. + 00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin + 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089...... + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::BoxedEnumArray + + .method public hidebysig static void BoxedLiteralsArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 10 00 00 00 08 01 00 00 00 09 02 00 // ...Q............ + 00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00 + 00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a + 00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?. + 00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text.. + 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::BoxedLiteralsArray + + .property string Property() + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 0F 00 00 00 00 00 ) // ag...... + .get string CustomAttributes.CustomAttributes::get_Property() + } // end of property CustomAttributes::Property +} // end of class CustomAttributes.CustomAttributes + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.roslyn.il new file mode 100644 index 000000000..50c786b4d --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.roslyn.il @@ -0,0 +1,337 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributes +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) + + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributes.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested public EnumWithFlag + extends [mscorlib]System.Enum + { + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008) + } // end of class EnumWithFlag + + .class auto ansi nested public beforefieldinit MyAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(object val) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: ret + } // end of method MyAttribute::.ctor + + } // end of class MyAttribute + + .class auto ansi sealed nested public ULongEnum + extends [mscorlib]System.Enum + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum. + FF FF FF FF FF FF FF 00 00 ) + .field public specialname rtspecialname uint64 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF) + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 ) + } // end of class ULongEnum + + .class auto ansi nested public beforefieldinit TypesAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type 'type') cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: ret + } // end of method TypesAttribute::.ctor + + } // end of class TypesAttribute + + .class auto ansi nested private beforefieldinit SomeType`1 + extends [mscorlib]System.Object + { + .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 SomeType`1::.ctor + + } // end of class SomeType`1 + + .class auto ansi nested private beforefieldinit SomeType`2 + extends [mscorlib]System.Object + { + .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 SomeType`2::.ctor + + } // end of class SomeType`2 + + .class sequential ansi sealed nested private beforefieldinit DataType + extends [mscorlib]System.ValueType + { + .field private int32 i + } // end of class DataType + + .field private static int32 typeattr_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32, + 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi + 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult + 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub + 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a + 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089.. + .field private static int32 typeattr_null + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 ) + .field private static int32 typeattr_list_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle + 63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L + 69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In + 74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve + 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C + 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral, + 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b + 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089. + 00 ) + .field private static int32 typeattr_list_unbound + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec + 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li + 73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib, + 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0, + 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral + 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken + 3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08 + 39 00 00 ) // 9.. + .field private static int32 typeattr_sometype_of_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu + 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib + 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[ + 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes + 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute + 73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType].. + .field private static int32 typeattr_sometype_of_datatype2 + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust + 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da + 74 61 54 79 70 65 5D 00 00 ) // taType].. + .field private static int32 typeattr_sometype_of_datatype_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys + 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor + 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0 + 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne + 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey + 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619 + 33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]].. + .field private static int32 typeattr_sometype_of_datatype_array_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S + 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]].. + .field private static int32 typeattr_sometype_of_nested_sometype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C + 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+ + 44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste + 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 5D 5D 00 00 ) // e089]].. + .field private static int32 typeattr_sometype_of_int_and_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D + 61 74 61 54 79 70 65 5D 00 00 ) // ataType].. + .field private static int32 typeattr_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[ + 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089.. + .field private static int32 typeattr_multidim_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[ + 2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 00 00 ) // e089.. + .field private static int32 'field' + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 03 00 00 00 00 00 ) // ag...... + .method public hidebysig specialname static + string get_Property() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "aa" + IL_0005: ret + } // end of method CustomAttributes::get_Property + + .method public hidebysig static void ObsoletedMethod() cil managed + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. + 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::ObsoletedMethod + + .method public hidebysig static void EnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri + 6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms + 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version= + 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture + 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public + 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5 + 36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089....... + 00 00 00 00 00 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::EnumArray + + .method public hidebysig static void BoxedEnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem + 2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso + 6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089.. + 00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin + 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089...... + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::BoxedEnumArray + + .method public hidebysig static void BoxedLiteralsArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 10 00 00 00 08 01 00 00 00 09 02 00 // ...Q............ + 00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00 + 00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a + 00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?. + 00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text.. + 00 00 ) + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method CustomAttributes::BoxedLiteralsArray + + .property string Property() + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 0F 00 00 00 00 00 ) // ag...... + .get string CustomAttributes.CustomAttributes::get_Property() + } // end of property CustomAttributes::Property +} // end of class CustomAttributes.CustomAttributes + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.roslyn.il new file mode 100644 index 000000000..6fb822d67 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.roslyn.il @@ -0,0 +1,353 @@ + + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly CustomAttributes +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx + 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) + + .permissionset reqmin + = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module CustomAttributes.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x10000000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes + extends [mscorlib]System.Object +{ + .class auto ansi sealed nested public EnumWithFlag + extends [mscorlib]System.Enum + { + .custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004) + .field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008) + } // end of class EnumWithFlag + + .class auto ansi nested public beforefieldinit MyAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(object val) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: nop + IL_0007: nop + IL_0008: ret + } // end of method MyAttribute::.ctor + + } // end of class MyAttribute + + .class auto ansi sealed nested public ULongEnum + extends [mscorlib]System.Enum + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum. + FF FF FF FF FF FF FF 00 00 ) + .field public specialname rtspecialname uint64 value__ + .field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF) + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 ) + } // end of class ULongEnum + + .class auto ansi nested public beforefieldinit TypesAttribute + extends [mscorlib]System.Attribute + { + .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(class [mscorlib]System.Type 'type') cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Attribute::.ctor() + IL_0006: nop + IL_0007: nop + IL_0008: ret + } // end of method TypesAttribute::.ctor + + } // end of class TypesAttribute + + .class auto ansi nested private beforefieldinit SomeType`1 + extends [mscorlib]System.Object + { + .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 SomeType`1::.ctor + + } // end of class SomeType`1 + + .class auto ansi nested private beforefieldinit SomeType`2 + extends [mscorlib]System.Object + { + .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 SomeType`2::.ctor + + } // end of class SomeType`2 + + .class sequential ansi sealed nested private beforefieldinit DataType + extends [mscorlib]System.ValueType + { + .field private int32 i + } // end of class DataType + + .field private static int32 typeattr_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32, + 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi + 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult + 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub + 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a + 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089.. + .field private static int32 typeattr_null + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 ) + .field private static int32 typeattr_list_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle + 63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L + 69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In + 74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V + 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0, + 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral, + 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken= + 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089 + 5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve + 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C + 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral, + 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b + 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089. + 00 ) + .field private static int32 typeattr_list_unbound + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec + 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li + 73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib, + 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0, + 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral + 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken + 3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08 + 39 00 00 ) // 9.. + .field private static int32 typeattr_sometype_of_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu + 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib + 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[ + 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes + 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute + 73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType].. + .field private static int32 typeattr_sometype_of_datatype2 + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust + 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da + 74 61 54 79 70 65 5D 00 00 ) // taType].. + .field private static int32 typeattr_sometype_of_datatype_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys + 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor + 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0 + 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne + 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey + 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619 + 33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]].. + .field private static int32 typeattr_sometype_of_datatype_array_and_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S + 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]].. + .field private static int32 typeattr_sometype_of_nested_sometype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute + 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut + 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C + 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+ + 44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste + 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 5D 5D 00 00 ) // e089]].. + .field private static int32 typeattr_sometype_of_int_and_datatype + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2 + 5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32, + 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio + 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu + 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ + 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5 + 63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus + 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu + 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D + 61 74 61 54 79 70 65 5D 00 00 ) // ataType].. + .field private static int32 typeattr_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[ + 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089.. + .field private static int32 typeattr_multidim_array_of_int + .custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[ + 2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli + 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0 + 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut + 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo + 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934 + 65 30 38 39 00 00 ) // e089.. + .field private static int32 'field' + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 03 00 00 00 00 00 ) // ag...... + .method public hidebysig specialname static + string get_Property() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "aa" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method CustomAttributes::get_Property + + .method public hidebysig static void ObsoletedMethod() cil managed + { + .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. + 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::ObsoletedMethod + + .method public hidebysig static void EnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri + 6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms + 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version= + 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture + 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public + 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5 + 36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089....... + 00 00 00 00 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::EnumArray + + .method public hidebysig static void BoxedEnumArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem + 2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso + 6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver + 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu + 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P + 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7 + 37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089.. + 00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin + 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc + 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4 + 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture= + 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK + 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56 + 31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089...... + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::BoxedEnumArray + + .method public hidebysig static void BoxedLiteralsArray() cil managed + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 10 00 00 00 08 01 00 00 00 09 02 00 // ...Q............ + 00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00 + 00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a + 00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?. + 00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text.. + 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method CustomAttributes::BoxedLiteralsArray + + .property string Property() + { + .custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib + 75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri + 62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl + 61 67 0F 00 00 00 00 00 ) // ag...... + .get string CustomAttributes.CustomAttributes::get_Property() + } // end of property CustomAttributes::Property +} // end of class CustomAttributes.CustomAttributes + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE ***********************