|
| 1 | +// To extend use: |
| 2 | +// see https://lab.razor.fyi/#fVHNbhMxEFYRqrBP0CcYbpsDVlioVDU_UrSNUBCqImVPnHC8k8TgtRd7tiSqcuMh-gbceQBeihdA66bJNlK5WDPzfTPffGP-65TzqXdLL0uhwtndaR20XcJsEwjLHm9nInPGoCLtbBAf0KLX6j-MSVnWJOcGjzhXWi6tC6RVeBoRmStwZKXZBH1M-6Tt96NSvvIoC22XT9VFLsO30OPcyhJDJRXCJJutpK8aIXGFypWVNuhFjoFCfDMZMIipR6INv-VMW0JvpYFAkrQCZWQIMF4T2qCdnXpXoSeNgbNbzhg-AP18mEwOl-nnQ1D7rAM_VugRcrgE68jWxnAW-1lVz41WMHfOwCSMy4o2MGj3iszVlmAwgG6Ptzq0JWgMQBzDlvgQMY9Uewvv017Mt_ENezzm2_aoG6cLGBXFZHHt6Lo2JslBE5adhnPfpBeQNCV4PYBm_QjtMNZadlQUkddpaT_SylPIZKB-ng6TxoK2Ba7390nhEvKD6s5JkqedxM2_oqJOS2tssERLI0ruh0TJR2K7P4z-ZjHef2RyMNcsueVsy7f87NW56Irum1Sk5-8uuuJt9-LjM20-sxd3P__-_rN4-fzLyfrkHw |
| 3 | +// created using https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-tools/NuGet/Microsoft.Net.Compilers.Toolset/overview/5.0.0-2.25380.108 |
| 4 | + |
| 5 | +.class private auto ansi abstract sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ExtensionPropertiesV1 |
| 6 | + extends [System.Runtime]System.Object |
| 7 | +{ |
| 8 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( |
| 9 | + 01 00 01 00 00 |
| 10 | + ) |
| 11 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( |
| 12 | + 01 00 00 00 00 |
| 13 | + ) |
| 14 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( |
| 15 | + 01 00 00 00 |
| 16 | + ) |
| 17 | + // Nested Types |
| 18 | + .class nested public auto ansi sealed specialname beforefieldinit '<>E__0`1'<T> |
| 19 | + extends [System.Runtime]System.Object |
| 20 | + { |
| 21 | + // Methods |
| 22 | + .method private hidebysig specialname static |
| 23 | + void '<Extension>$' ( |
| 24 | + class [System.Runtime]System.Collections.Generic.ICollection`1<!T> collection |
| 25 | + ) cil managed |
| 26 | + { |
| 27 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( |
| 28 | + 01 00 00 00 |
| 29 | + ) |
| 30 | + // Method begins at RVA 0x209d |
| 31 | + // Header size: 1 |
| 32 | + // Code size: 1 (0x1) |
| 33 | + .maxstack 8 |
| 34 | + |
| 35 | + IL_0000: ret |
| 36 | + } // end of method '<>E__0`1'::'<Extension>$' |
| 37 | + |
| 38 | + .method public hidebysig specialname |
| 39 | + instance bool get_IsEmpty () cil managed |
| 40 | + { |
| 41 | + // Method begins at RVA 0x209f |
| 42 | + // Header size: 1 |
| 43 | + // Code size: 2 (0x2) |
| 44 | + .maxstack 8 |
| 45 | + |
| 46 | + IL_0000: ldnull |
| 47 | + IL_0001: throw |
| 48 | + } // end of method '<>E__0`1'::get_IsEmpty |
| 49 | + |
| 50 | + .method public hidebysig specialname |
| 51 | + instance int32 get_Test () cil managed |
| 52 | + { |
| 53 | + // Method begins at RVA 0x209f |
| 54 | + // Header size: 1 |
| 55 | + // Code size: 2 (0x2) |
| 56 | + .maxstack 8 |
| 57 | + |
| 58 | + IL_0000: ldnull |
| 59 | + IL_0001: throw |
| 60 | + } // end of method '<>E__0`1'::get_Test |
| 61 | + |
| 62 | + .method public hidebysig specialname |
| 63 | + instance void set_Test ( |
| 64 | + int32 'value' |
| 65 | + ) cil managed |
| 66 | + { |
| 67 | + // Method begins at RVA 0x209f |
| 68 | + // Header size: 1 |
| 69 | + // Code size: 2 (0x2) |
| 70 | + .maxstack 8 |
| 71 | + |
| 72 | + IL_0000: ldnull |
| 73 | + IL_0001: throw |
| 74 | + } // end of method '<>E__0`1'::set_Test |
| 75 | + |
| 76 | + .method public hidebysig |
| 77 | + instance void AddIfNotNull ( |
| 78 | + !T item |
| 79 | + ) cil managed |
| 80 | + { |
| 81 | + // Method begins at RVA 0x209f |
| 82 | + // Header size: 1 |
| 83 | + // Code size: 2 (0x2) |
| 84 | + .maxstack 8 |
| 85 | + |
| 86 | + IL_0000: ldnull |
| 87 | + IL_0001: throw |
| 88 | + } // end of method '<>E__0`1'::AddIfNotNull |
| 89 | + |
| 90 | + .method public hidebysig |
| 91 | + instance !!T2 Cast<(!T) T2> ( |
| 92 | + int32 index |
| 93 | + ) cil managed |
| 94 | + { |
| 95 | + .param type T2 |
| 96 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( |
| 97 | + 01 00 00 00 00 |
| 98 | + ) |
| 99 | + // Method begins at RVA 0x209f |
| 100 | + // Header size: 1 |
| 101 | + // Code size: 2 (0x2) |
| 102 | + .maxstack 8 |
| 103 | + |
| 104 | + IL_0000: ldnull |
| 105 | + IL_0001: throw |
| 106 | + } // end of method '<>E__0`1'::Cast |
| 107 | + |
| 108 | + .method public hidebysig static |
| 109 | + void StaticExtension () cil managed |
| 110 | + { |
| 111 | + // Method begins at RVA 0x209f |
| 112 | + // Header size: 1 |
| 113 | + // Code size: 2 (0x2) |
| 114 | + .maxstack 8 |
| 115 | + |
| 116 | + IL_0000: ldnull |
| 117 | + IL_0001: throw |
| 118 | + } // end of method '<>E__0`1'::StaticExtension |
| 119 | + |
| 120 | + // Properties |
| 121 | + .property instance bool IsEmpty() |
| 122 | + { |
| 123 | + .get instance bool ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ExtensionPropertiesV1/'<>E__0`1'::get_IsEmpty() |
| 124 | + } |
| 125 | + .property instance int32 Test() |
| 126 | + { |
| 127 | + .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ExtensionPropertiesV1/'<>E__0`1'::get_Test() |
| 128 | + .set instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ExtensionPropertiesV1/'<>E__0`1'::set_Test(int32) |
| 129 | + } |
| 130 | + |
| 131 | + } // end of class <>E__0`1 |
| 132 | + |
| 133 | + |
| 134 | + // Methods |
| 135 | + .method public hidebysig static |
| 136 | + bool get_IsEmpty<T> ( |
| 137 | + class [System.Runtime]System.Collections.Generic.ICollection`1<!!T> collection |
| 138 | + ) cil managed |
| 139 | + { |
| 140 | + // Method begins at RVA 0x2050 |
| 141 | + // Header size: 1 |
| 142 | + // Code size: 10 (0xa) |
| 143 | + .maxstack 8 |
| 144 | + |
| 145 | + IL_0000: ldarg.0 |
| 146 | + IL_0001: callvirt instance int32 class [System.Runtime]System.Collections.Generic.ICollection`1<!!T>::get_Count() |
| 147 | + IL_0006: ldc.i4.0 |
| 148 | + IL_0007: ceq |
| 149 | + IL_0009: ret |
| 150 | + } // end of method ExtensionProperties::get_IsEmpty |
| 151 | + |
| 152 | + .method public hidebysig static |
| 153 | + int32 get_Test<T> ( |
| 154 | + class [System.Runtime]System.Collections.Generic.ICollection`1<!!T> collection |
| 155 | + ) cil managed |
| 156 | + { |
| 157 | + // Method begins at RVA 0x205b |
| 158 | + // Header size: 1 |
| 159 | + // Code size: 4 (0x4) |
| 160 | + .maxstack 8 |
| 161 | + |
| 162 | + IL_0000: nop |
| 163 | + IL_0001: ldc.i4.s 42 |
| 164 | + IL_0003: ret |
| 165 | + } // end of method ExtensionProperties::get_Test |
| 166 | + |
| 167 | + .method public hidebysig static |
| 168 | + void set_Test<T> ( |
| 169 | + class [System.Runtime]System.Collections.Generic.ICollection`1<!!T> collection, |
| 170 | + int32 'value' |
| 171 | + ) cil managed |
| 172 | + { |
| 173 | + // Method begins at RVA 0x2060 |
| 174 | + // Header size: 1 |
| 175 | + // Code size: 2 (0x2) |
| 176 | + .maxstack 8 |
| 177 | + |
| 178 | + IL_0000: nop |
| 179 | + IL_0001: ret |
| 180 | + } // end of method ExtensionProperties::set_Test |
| 181 | + |
| 182 | + .method public hidebysig static |
| 183 | + void AddIfNotNull<T> ( |
| 184 | + class [System.Runtime]System.Collections.Generic.ICollection`1<!!T> collection, |
| 185 | + !!T item |
| 186 | + ) cil managed |
| 187 | + { |
| 188 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( |
| 189 | + 01 00 00 00 |
| 190 | + ) |
| 191 | + // Method begins at RVA 0x2064 |
| 192 | + // Header size: 12 |
| 193 | + // Code size: 25 (0x19) |
| 194 | + .maxstack 2 |
| 195 | + .locals init ( |
| 196 | + [0] bool |
| 197 | + ) |
| 198 | + |
| 199 | + IL_0000: nop |
| 200 | + IL_0001: ldarg.1 |
| 201 | + IL_0002: box !!T |
| 202 | + IL_0007: ldnull |
| 203 | + IL_0008: cgt.un |
| 204 | + IL_000a: stloc.0 |
| 205 | + IL_000b: ldloc.0 |
| 206 | + IL_000c: brfalse.s IL_0018 |
| 207 | + |
| 208 | + IL_000e: nop |
| 209 | + IL_000f: ldarg.0 |
| 210 | + IL_0010: ldarg.1 |
| 211 | + IL_0011: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<!!T>::Add(!0) |
| 212 | + IL_0016: nop |
| 213 | + IL_0017: nop |
| 214 | + |
| 215 | + IL_0018: ret |
| 216 | + } // end of method ExtensionProperties::AddIfNotNull |
| 217 | + |
| 218 | + .method public hidebysig static |
| 219 | + !!T2 Cast<T, (!!T) T2> ( |
| 220 | + class [System.Runtime]System.Collections.Generic.ICollection`1<!!T> collection, |
| 221 | + int32 index |
| 222 | + ) cil managed |
| 223 | + { |
| 224 | + .custom instance void [System.Runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( |
| 225 | + 01 00 00 00 |
| 226 | + ) |
| 227 | + // Method begins at RVA 0x2089 |
| 228 | + // Header size: 1 |
| 229 | + // Code size: 19 (0x13) |
| 230 | + .maxstack 8 |
| 231 | + |
| 232 | + IL_0000: nop |
| 233 | + IL_0001: ldarg.0 |
| 234 | + IL_0002: ldarg.1 |
| 235 | + IL_0003: call !!0 [System.Linq]System.Linq.Enumerable::ElementAt<!!T>(class [System.Runtime]System.Collections.Generic.IEnumerable`1<!!0>, int32) |
| 236 | + IL_0008: box !!T |
| 237 | + IL_000d: unbox.any !!T2 |
| 238 | + IL_0012: ret |
| 239 | + } // end of method ExtensionProperties::Cast |
| 240 | + |
| 241 | + .method public hidebysig static |
| 242 | + void StaticExtension<T> () cil managed |
| 243 | + { |
| 244 | + // Method begins at RVA 0x2060 |
| 245 | + // Header size: 1 |
| 246 | + // Code size: 2 (0x2) |
| 247 | + .maxstack 8 |
| 248 | + |
| 249 | + IL_0000: nop |
| 250 | + IL_0001: ret |
| 251 | + } // end of method ExtensionProperties::StaticExtension |
| 252 | + |
| 253 | +} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ExtensionPropertiesV1 |
0 commit comments