All pastes #817475 Raw Edit

Untitled

public text v1 · immutable
·published 2007-12-15 16:57 UTC
rendered paste body
.method public hidebysig instance void PrintUsingAForLoopAndRemoveAValueIfNotExists() cil managed
{
    .maxstack 2
    .locals init (
        [0] bool CS$4$0000)
    L_0000: nop 
    L_0001: ldarg.0 
    L_0002: call instance void Test.Rules.Smells.ClassWithoutCodeDuplicated::PrintValuesInListUsingAForLoop()
    L_0007: nop 
    L_0008: ldarg.0 
    L_0009: ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
    L_000e: ldstr "Bar"
    L_0013: callvirt instance bool [mscorlib]System.Collections.IList::Contains(object)
    L_0018: stloc.0 
    L_0019: ldloc.0 
    L_001a: brtrue.s L_002d
    L_001c: ldarg.0 
    L_001d: ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
    L_0022: ldstr "Bar"
    L_0027: callvirt instance void [mscorlib]System.Collections.IList::Remove(object)
    L_002c: nop 
    L_002d: ret 
}

 

 .method public hidebysig instance void PrintUsingAForLoopAndRemoveAValueIfExists() cil managed
{
    .maxstack 2
    .locals init (
        [0] bool CS$4$0000)
    L_0000: nop 
    L_0001: ldarg.0 
    L_0002: call instance void Test.Rules.Smells.ClassWithoutCodeDuplicated::PrintValuesInListUsingAForLoop()
    L_0007: nop 
    L_0008: ldarg.0 
    L_0009: ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
    L_000e: ldstr "Bar"
    L_0013: callvirt instance bool [mscorlib]System.Collections.IList::Contains(object)
    L_0018: ldc.i4.0 
    L_0019: ceq 
    L_001b: stloc.0 
    L_001c: ldloc.0 
    L_001d: brtrue.s L_0030
    L_001f: ldarg.0 
    L_0020: ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
    L_0025: ldstr "Bar"
    L_002a: callvirt instance void [mscorlib]System.Collections.IList::Remove(object)
    L_002f: nop 
    L_0030: ret 
}

//Windows Generation

    .method public hidebysig 
           instance default void PrintUsingAForLoopAndRemoveAValueIfNotExists ()  cil managed 
    {
        // Method begins at RVA 0x49d9
	// Code size 41 (0x29)
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void class Test.Rules.Smells.ClassWithoutCodeDuplicated::PrintValuesInListUsingAForLoop()
	IL_0006:  ldarg.0 
	IL_0007:  ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
	IL_000c:  ldstr "Bar"
	IL_0011:  callvirt instance bool class [mscorlib]System.Collections.IList::Contains(object)
	IL_0016:  brtrue.s IL_0028

	IL_0018:  ldarg.0 
	IL_0019:  ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
	IL_001e:  ldstr "Bar"
	IL_0023:  callvirt instance void class [mscorlib]System.Collections.IList::Remove(object)
	IL_0028:  ret 
    } // end of method ClassWithoutCodeDuplicated::PrintUsingAForLoopAndRemoveAValueIfNotExists

    // method line 94
    .method public hidebysig 
           instance default void PrintUsingAForLoopAndRemoveAValueIfExists ()  cil managed 
    {
        // Method begins at RVA 0x4a03
	// Code size 41 (0x29)
	.maxstack 8
	IL_0000:  ldarg.0 
	IL_0001:  call instance void class Test.Rules.Smells.ClassWithoutCodeDuplicated::PrintValuesInListUsingAForLoop()
	IL_0006:  ldarg.0 
	IL_0007:  ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
	IL_000c:  ldstr "Bar"
	IL_0011:  callvirt instance bool class [mscorlib]System.Collections.IList::Contains(object)
	IL_0016:  brfalse.s IL_0028

	IL_0018:  ldarg.0 
	IL_0019:  ldfld class [mscorlib]System.Collections.IList Test.Rules.Smells.ClassWithoutCodeDuplicated::myList
	IL_001e:  ldstr "Bar"
	IL_0023:  callvirt instance void class [mscorlib]System.Collections.IList::Remove(object)
	IL_0028:  ret 
    } // end of method ClassWithoutCodeDuplicated::PrintUsingAForLoopAndRemoveAValueIfExists