Browse Source

Add more test cases to PropertiesAndEvents.

pull/1420/head
Siegfried Pammer 8 years ago
parent
commit
7df1ff3f93
  1. 48
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.cs
  2. 235
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il
  3. 217
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il
  4. 224
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il
  5. 232
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il

48
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.cs

@ -6,6 +6,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -6,6 +6,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
private interface IBase
{
int GetterOnly {
get;
}
int SetterOnly {
set;
}
int Test {
get;
set;
@ -24,7 +32,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -24,7 +32,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
public override event EventHandler ThisIsAnAbstractEvent;
}
private class Impl : IBase
private class ExplicitImpl : IBase
{
int IBase.Test {
get {
@ -34,6 +42,18 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -34,6 +42,18 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
int IBase.GetterOnly {
get {
throw new NotImplementedException();
}
}
int IBase.SetterOnly {
set {
throw new NotImplementedException();
}
}
event Action IBase.Event {
add {
}
@ -42,6 +62,32 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -42,6 +62,32 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
private class Impl : IBase
{
public int GetterOnly {
get {
throw new NotImplementedException();
}
}
public int SetterOnly {
set {
throw new NotImplementedException();
}
}
public int Test {
get {
throw new NotImplementedException();
}
set {
throw new NotImplementedException();
}
}
public event Action Event;
}
private interface IChange
{
int Property {

235
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il

@ -34,6 +34,16 @@ @@ -34,6 +34,16 @@
{
.class interface abstract auto ansi nested private IBase
{
.method public hidebysig newslot specialname abstract virtual
instance int32 get_GetterOnly() cil managed
{
} // end of method IBase::get_GetterOnly
.method public hidebysig newslot specialname abstract virtual
instance void set_SetterOnly(int32 'value') cil managed
{
} // end of method IBase::set_SetterOnly
.method public hidebysig newslot specialname abstract virtual
instance int32 get_Test() cil managed
{
@ -59,10 +69,18 @@ @@ -59,10 +69,18 @@
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event(class [mscorlib]System.Action)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event(class [mscorlib]System.Action)
} // end of event IBase::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly()
} // end of property IBase::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly(int32)
} // end of property IBase::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_Test(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test()
} // end of property IBase::Test
} // end of class IBase
@ -197,7 +215,7 @@ @@ -197,7 +215,7 @@
} // end of event OtherClass::ThisIsAnAbstractEvent
} // end of class OtherClass
.class auto ansi nested private beforefieldinit Impl
.class auto ansi nested private beforefieldinit ExplicitImpl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
@ -210,7 +228,7 @@ @@ -210,7 +228,7 @@
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
@ -220,7 +238,29 @@ @@ -220,7 +238,29 @@
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
.method private hidebysig newslot specialname virtual final
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly() cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
@ -230,7 +270,7 @@ @@ -230,7 +270,7 @@
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
@ -240,7 +280,7 @@ @@ -240,7 +280,7 @@
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
@ -250,18 +290,181 @@ @@ -250,18 +290,181 @@
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Impl::.ctor
} // end of method ExplicitImpl::.ctor
.event [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
} // end of event Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
} // end of event ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
} // end of property Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly()
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32)
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly
} // end of class ExplicitImpl
.class auto ansi nested private beforefieldinit Impl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
.field private class [mscorlib]System.Action Event
.method public hidebysig newslot specialname virtual final
instance int32 get_GetterOnly() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::get_GetterOnly
.method public hidebysig newslot specialname virtual final
instance void set_SetterOnly(int32 'value') cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::set_SetterOnly
.method public hidebysig newslot specialname virtual final
instance int32 get_Test() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::get_Test
.method public hidebysig newslot specialname virtual final
instance void set_Test(int32 'value') cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::set_Test
.method public hidebysig newslot specialname virtual final
instance void add_Event(class [mscorlib]System.Action 'value') cil managed
{
// Code size 48 (0x30)
.maxstack 3
.locals init (class [mscorlib]System.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2,
bool V_3)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::add_Event
.method public hidebysig newslot specialname virtual final
instance void remove_Event(class [mscorlib]System.Action 'value') cil managed
{
// Code size 48 (0x30)
.maxstack 3
.locals init (class [mscorlib]System.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2,
bool V_3)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::remove_Event
.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 Impl::.ctor
.event [mscorlib]System.Action Event
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::remove_Event(class [mscorlib]System.Action)
} // end of event Impl::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_GetterOnly()
} // end of property Impl::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_SetterOnly(int32)
} // end of property Impl::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_Test(int32)
} // end of property Impl::Test
} // end of class Impl
.class interface abstract auto ansi nested private IChange
@ -288,8 +491,8 @@ @@ -288,8 +491,8 @@
.event [mscorlib]System.EventHandler Changed
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::remove_Changed(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::add_Changed(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::remove_Changed(class [mscorlib]System.EventHandler)
} // end of event IChange::Changed
.property instance int32 Property()
{
@ -685,13 +888,13 @@ @@ -685,13 +888,13 @@
} // end of event PropertiesAndEvents::AutomaticEvent
.event [mscorlib]System.EventHandler AutomaticEventWithInitializer
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler)
} // end of event PropertiesAndEvents::AutomaticEventWithInitializer
.event [mscorlib]System.EventHandler CustomEvent
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_CustomEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler)
} // end of event PropertiesAndEvents::CustomEvent
.property instance int32 Value()
{

217
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il

@ -34,6 +34,16 @@ @@ -34,6 +34,16 @@
{
.class interface abstract auto ansi nested private IBase
{
.method public hidebysig newslot specialname abstract virtual
instance int32 get_GetterOnly() cil managed
{
} // end of method IBase::get_GetterOnly
.method public hidebysig newslot specialname abstract virtual
instance void set_SetterOnly(int32 'value') cil managed
{
} // end of method IBase::set_SetterOnly
.method public hidebysig newslot specialname abstract virtual
instance int32 get_Test() cil managed
{
@ -59,10 +69,18 @@ @@ -59,10 +69,18 @@
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event(class [mscorlib]System.Action)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event(class [mscorlib]System.Action)
} // end of event IBase::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly()
} // end of property IBase::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly(int32)
} // end of property IBase::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_Test(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test()
} // end of property IBase::Test
} // end of class IBase
@ -185,7 +203,7 @@ @@ -185,7 +203,7 @@
} // end of event OtherClass::ThisIsAnAbstractEvent
} // end of class OtherClass
.class auto ansi nested private beforefieldinit Impl
.class auto ansi nested private beforefieldinit ExplicitImpl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
@ -197,7 +215,7 @@ @@ -197,7 +215,7 @@
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
@ -206,7 +224,27 @@ @@ -206,7 +224,27 @@
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
.method private hidebysig newslot specialname virtual final
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly() cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
@ -215,7 +253,7 @@ @@ -215,7 +253,7 @@
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
@ -224,7 +262,7 @@ @@ -224,7 +262,7 @@
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
@ -234,18 +272,165 @@ @@ -234,18 +272,165 @@
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Impl::.ctor
} // end of method ExplicitImpl::.ctor
.event [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
} // end of event Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
} // end of event ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
} // end of property Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly()
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32)
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly
} // end of class ExplicitImpl
.class auto ansi nested private beforefieldinit Impl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
.field private class [mscorlib]System.Action Event
.method public hidebysig newslot specialname virtual final
instance int32 get_GetterOnly() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::get_GetterOnly
.method public hidebysig newslot specialname virtual final
instance void set_SetterOnly(int32 'value') cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::set_SetterOnly
.method public hidebysig newslot specialname virtual final
instance int32 get_Test() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::get_Test
.method public hidebysig newslot specialname virtual final
instance void set_Test(int32 'value') cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::set_Test
.method public hidebysig newslot specialname virtual final
instance void add_Event(class [mscorlib]System.Action 'value') cil managed
{
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::add_Event
.method public hidebysig newslot specialname virtual final
instance void remove_Event(class [mscorlib]System.Action 'value') cil managed
{
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::remove_Event
.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 Impl::.ctor
.event [mscorlib]System.Action Event
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::remove_Event(class [mscorlib]System.Action)
} // end of event Impl::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_GetterOnly()
} // end of property Impl::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_SetterOnly(int32)
} // end of property Impl::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_Test(int32)
} // end of property Impl::Test
} // end of class Impl
.class interface abstract auto ansi nested private IChange
@ -272,8 +457,8 @@ @@ -272,8 +457,8 @@
.event [mscorlib]System.EventHandler Changed
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::remove_Changed(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::add_Changed(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::remove_Changed(class [mscorlib]System.EventHandler)
} // end of event IChange::Changed
.property instance int32 Property()
{
@ -618,13 +803,13 @@ @@ -618,13 +803,13 @@
} // end of event PropertiesAndEvents::AutomaticEvent
.event [mscorlib]System.EventHandler AutomaticEventWithInitializer
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEventWithInitializer(class [mscorlib]System.EventHandler)
} // end of event PropertiesAndEvents::AutomaticEventWithInitializer
.event [mscorlib]System.EventHandler CustomEvent
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_CustomEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_CustomEvent(class [mscorlib]System.EventHandler)
} // end of event PropertiesAndEvents::CustomEvent
.property instance int32 Value()
{

224
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il

@ -38,6 +38,16 @@ @@ -38,6 +38,16 @@
{
.class interface abstract auto ansi nested private IBase
{
.method public hidebysig newslot specialname abstract virtual
instance int32 get_GetterOnly() cil managed
{
} // end of method IBase::get_GetterOnly
.method public hidebysig newslot specialname abstract virtual
instance void set_SetterOnly(int32 'value') cil managed
{
} // end of method IBase::set_SetterOnly
.method public hidebysig newslot specialname abstract virtual
instance int32 get_Test() cil managed
{
@ -65,6 +75,14 @@ @@ -65,6 +75,14 @@
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event(class [mscorlib]System.Action)
} // end of event IBase::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly()
} // end of property IBase::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly(int32)
} // end of property IBase::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test()
@ -196,7 +214,7 @@ @@ -196,7 +214,7 @@
} // end of event OtherClass::ThisIsAnAbstractEvent
} // end of class OtherClass
.class auto ansi nested private beforefieldinit Impl
.class auto ansi nested private beforefieldinit ExplicitImpl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
@ -208,7 +226,7 @@ @@ -208,7 +226,7 @@
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
@ -217,7 +235,27 @@ @@ -217,7 +235,27 @@
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
.method private hidebysig newslot specialname virtual final
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly() cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
@ -226,7 +264,7 @@ @@ -226,7 +264,7 @@
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
@ -235,7 +273,7 @@ @@ -235,7 +273,7 @@
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
@ -245,18 +283,168 @@ @@ -245,18 +283,168 @@
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Impl::.ctor
} // end of method ExplicitImpl::.ctor
.event [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
} // end of event Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
} // end of event ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
} // end of property Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly()
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32)
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly
} // end of class ExplicitImpl
.class auto ansi nested private beforefieldinit Impl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
.field private class [mscorlib]System.Action Event
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig newslot specialname virtual final
instance int32 get_GetterOnly() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::get_GetterOnly
.method public hidebysig newslot specialname virtual final
instance void set_SetterOnly(int32 'value') cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::set_SetterOnly
.method public hidebysig newslot specialname virtual final
instance int32 get_Test() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::get_Test
.method public hidebysig newslot specialname virtual final
instance void set_Test(int32 'value') cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::set_Test
.method public hidebysig newslot specialname virtual final
instance void add_Event(class [mscorlib]System.Action '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.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::add_Event
.method public hidebysig newslot specialname virtual final
instance void remove_Event(class [mscorlib]System.Action '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.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::remove_Event
.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 Impl::.ctor
.event [mscorlib]System.Action Event
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::remove_Event(class [mscorlib]System.Action)
} // end of event Impl::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_GetterOnly()
} // end of property Impl::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_SetterOnly(int32)
} // end of property Impl::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_Test(int32)
} // end of property Impl::Test
} // end of class Impl
.class interface abstract auto ansi nested private IChange
@ -388,7 +576,7 @@ @@ -388,7 +576,7 @@
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c' '<>9'
.field public static class [mscorlib]System.EventHandler '<>9__25_0'
.field public static class [mscorlib]System.EventHandler '<>9__26_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
@ -410,13 +598,13 @@ @@ -410,13 +598,13 @@
} // end of method '<>c'::.ctor
.method assembly hidebysig instance void
'<.ctor>b__25_0'(object '<p0>',
'<.ctor>b__26_0'(object '<p0>',
class [mscorlib]System.EventArgs '<p1>') cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<>c'::'<.ctor>b__25_0'
} // end of method '<>c'::'<.ctor>b__26_0'
} // end of class '<>c'
@ -640,18 +828,18 @@ @@ -640,18 +828,18 @@
// Code size 44 (0x2c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__25_0'
IL_0001: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__26_0'
IL_0006: dup
IL_0007: brtrue.s IL_0020
IL_0009: pop
IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9'
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<.ctor>b__25_0'(object,
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<.ctor>b__26_0'(object,
class [mscorlib]System.EventArgs)
IL_0015: newobj instance void [mscorlib]System.EventHandler::.ctor(object,
native int)
IL_001a: dup
IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__25_0'
IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__26_0'
IL_0020: stfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::AutomaticEventWithInitializer
IL_0025: ldarg.0
IL_0026: call instance void [mscorlib]System.Object::.ctor()

232
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il

@ -38,6 +38,16 @@ @@ -38,6 +38,16 @@
{
.class interface abstract auto ansi nested private IBase
{
.method public hidebysig newslot specialname abstract virtual
instance int32 get_GetterOnly() cil managed
{
} // end of method IBase::get_GetterOnly
.method public hidebysig newslot specialname abstract virtual
instance void set_SetterOnly(int32 'value') cil managed
{
} // end of method IBase::set_SetterOnly
.method public hidebysig newslot specialname abstract virtual
instance int32 get_Test() cil managed
{
@ -65,6 +75,14 @@ @@ -65,6 +75,14 @@
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event(class [mscorlib]System.Action)
} // end of event IBase::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly()
} // end of property IBase::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly(int32)
} // end of property IBase::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test()
@ -199,7 +217,7 @@ @@ -199,7 +217,7 @@
} // end of event OtherClass::ThisIsAnAbstractEvent
} // end of class OtherClass
.class auto ansi nested private beforefieldinit Impl
.class auto ansi nested private beforefieldinit ExplicitImpl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
@ -212,7 +230,7 @@ @@ -212,7 +230,7 @@
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
@ -222,7 +240,29 @@ @@ -222,7 +240,29 @@
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
.method private hidebysig newslot specialname virtual final
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly() cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_GetterOnly
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_SetterOnly
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
@ -232,7 +272,7 @@ @@ -232,7 +272,7 @@
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
@ -242,7 +282,7 @@ @@ -242,7 +282,7 @@
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
} // end of method ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
@ -253,18 +293,174 @@ @@ -253,18 +293,174 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Impl::.ctor
} // end of method ExplicitImpl::.ctor
.event [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
} // end of event Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action)
} // end of event ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Event
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
} // end of property Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32)
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.Test
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_GetterOnly()
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.GetterOnly
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_SetterOnly(int32)
} // end of property ExplicitImpl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.SetterOnly
} // end of class ExplicitImpl
.class auto ansi nested private beforefieldinit Impl
extends [mscorlib]System.Object
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
.field private class [mscorlib]System.Action Event
.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 newslot specialname virtual final
instance int32 get_GetterOnly() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::get_GetterOnly
.method public hidebysig newslot specialname virtual final
instance void set_SetterOnly(int32 'value') cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::set_SetterOnly
.method public hidebysig newslot specialname virtual final
instance int32 get_Test() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::get_Test
.method public hidebysig newslot specialname virtual final
instance void set_Test(int32 'value') cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::set_Test
.method public hidebysig newslot specialname virtual final
instance void add_Event(class [mscorlib]System.Action '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.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::add_Event
.method public hidebysig newslot specialname virtual final
instance void remove_Event(class [mscorlib]System.Action '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.Action V_0,
class [mscorlib]System.Action V_1,
class [mscorlib]System.Action V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
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.Action
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::Event
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.Action>(!!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 Impl::remove_Event
.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 Impl::.ctor
.event [mscorlib]System.Action Event
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::add_Event(class [mscorlib]System.Action)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::remove_Event(class [mscorlib]System.Action)
} // end of event Impl::Event
.property instance int32 GetterOnly()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_GetterOnly()
} // end of property Impl::GetterOnly
.property instance int32 SetterOnly()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_SetterOnly(int32)
} // end of property Impl::SetterOnly
.property instance int32 Test()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::get_Test()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_Test(int32)
} // end of property Impl::Test
} // end of class Impl
.class interface abstract auto ansi nested private IChange
@ -400,7 +596,7 @@ @@ -400,7 +596,7 @@
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c' '<>9'
.field public static class [mscorlib]System.EventHandler '<>9__25_0'
.field public static class [mscorlib]System.EventHandler '<>9__26_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
@ -423,14 +619,14 @@ @@ -423,14 +619,14 @@
} // end of method '<>c'::.ctor
.method assembly hidebysig instance void
'<.ctor>b__25_0'(object '<p0>',
'<.ctor>b__26_0'(object '<p0>',
class [mscorlib]System.EventArgs '<p1>') cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method '<>c'::'<.ctor>b__25_0'
} // end of method '<>c'::'<.ctor>b__26_0'
} // end of class '<>c'
@ -662,18 +858,18 @@ @@ -662,18 +858,18 @@
// Code size 45 (0x2d)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__25_0'
IL_0001: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__26_0'
IL_0006: dup
IL_0007: brtrue.s IL_0020
IL_0009: pop
IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9'
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<.ctor>b__25_0'(object,
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<.ctor>b__26_0'(object,
class [mscorlib]System.EventArgs)
IL_0015: newobj instance void [mscorlib]System.EventHandler::.ctor(object,
native int)
IL_001a: dup
IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__25_0'
IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__26_0'
IL_0020: stfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::AutomaticEventWithInitializer
IL_0025: ldarg.0
IL_0026: call instance void [mscorlib]System.Object::.ctor()

Loading…
Cancel
Save