Created
April 20, 2015 16:46
-
-
Save Rohansi/ad886988e2e5990d8fb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.namespace BoxTest | |
{ | |
.class interface public auto ansi abstract BoxTest.IEnumerable`2<T, TEnumerator> | |
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<!T>, | |
[mscorlib]System.Collections.IEnumerable | |
{ | |
// Methods | |
.method public hidebysig newslot abstract virtual | |
instance !TEnumerator GetEnumerator () cil managed | |
{ | |
} // end of method IEnumerable`2::GetEnumerator | |
} // end of class BoxTest.IEnumerable`2 | |
.class public auto ansi beforefieldinit BoxTest.Program | |
extends [mscorlib]System.Object | |
{ | |
// Methods | |
.method private hidebysig static | |
void Main ( | |
string[] args | |
) cil managed | |
{ | |
// Method begins at RVA 0x2050 | |
// Code size 1 (0x1) | |
.maxstack 8 | |
.entrypoint | |
IL_0000: ret | |
} // end of method Program::Main | |
.method public hidebysig static | |
void TestMethod<(class BoxTest.IEnumerable`2<!!T, !!TEnumerator>) TEnumerable, (class [mscorlib]System.Collections.Generic.IEnumerator`1<!!T>) TEnumerator, T> ( | |
!!TEnumerable enumerable | |
) cil managed | |
{ | |
// Method begins at RVA 0x2054 | |
// Code size 68 (0x44) | |
.maxstack 1 | |
.locals init ( | |
[0] !!TEnumerator | |
) | |
IL_0000: ldarga.s enumerable | |
IL_0002: constrained. !!TEnumerable | |
IL_0008: callvirt instance !1 class BoxTest.IEnumerable`2<!!T, !!TEnumerator>::GetEnumerator() | |
IL_000d: stloc.0 | |
.try | |
{ | |
IL_000e: br.s IL_001e | |
// loop start (head: IL_001e) | |
IL_0010: ldloca.s 0 | |
IL_0012: constrained. !!TEnumerator | |
IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<!!T>::get_Current() | |
IL_001d: pop | |
IL_001e: ldloca.s 0 | |
IL_0020: constrained. !!TEnumerator | |
IL_0026: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() | |
IL_002b: brtrue.s IL_0010 | |
// end loop | |
IL_002d: leave.s IL_0043 | |
} // end .try | |
finally | |
{ | |
IL_002f: ldloc.0 | |
IL_0030: box !!TEnumerator | |
IL_0035: brfalse.s IL_0042 | |
IL_0037: ldloc.0 | |
IL_0038: box !!TEnumerator | |
IL_003d: callvirt instance void [mscorlib]System.IDisposable::Dispose() | |
IL_0042: endfinally | |
} // end handler | |
IL_0043: ret | |
} // end of method Program::TestMethod | |
.method public hidebysig specialname rtspecialname | |
instance void .ctor () cil managed | |
{ | |
// Method begins at RVA 0x20b4 | |
// 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 Program::.ctor | |
} // end of class BoxTest.Program | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment