Browse Source

Merge PropertiesAndEvents tests.

pull/1440/head
Siegfried Pammer 6 years ago
parent
commit
ae8065b1c0
  1. 80
      ICSharpCode.Decompiler.Tests/PropertiesAndEvents.cs
  2. 55
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.cs
  3. 154
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il
  4. 125
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il
  5. 113
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.roslyn.il
  6. 138
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.roslyn.il

80
ICSharpCode.Decompiler.Tests/PropertiesAndEvents.cs

@ -1,80 +0,0 @@ @@ -1,80 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Text;
public class PropertiesAndEvents
{
public event EventHandler AutomaticEvent;
[field: NonSerialized]
public event EventHandler AutomaticEventWithInitializer = delegate(object sender, EventArgs e)
{
};
public event EventHandler CustomEvent
{
add
{
this.AutomaticEvent += value;
}
remove
{
this.AutomaticEvent -= value;
}
}
public int AutomaticProperty
{
get;
set;
}
public int CustomProperty
{
get
{
return this.AutomaticProperty;
}
set
{
this.AutomaticProperty = value;
}
}
public int Getter(StringBuilder b)
{
return b.Length;
}
public void Setter(StringBuilder b)
{
b.Capacity = 100;
}
public char IndexerGetter(StringBuilder b)
{
return b[50];
}
public void IndexerSetter(StringBuilder b)
{
b[42] = 'b';
}
}

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

@ -1,4 +1,23 @@ @@ -1,4 +1,23 @@
using System;
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Text;
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
@ -127,6 +146,20 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -127,6 +146,20 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
private set;
}
public int AutomaticProperty {
get;
set;
}
public int CustomProperty {
get {
return AutomaticProperty;
}
set {
AutomaticProperty = value;
}
}
private object Issue1221 {
set {
issue1221 = value;
@ -166,5 +199,25 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -166,5 +199,25 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
AutomaticEvent -= value;
}
}
public int Getter(StringBuilder b)
{
return b.Length;
}
public void Setter(StringBuilder b)
{
b.Capacity = 100;
}
public char IndexerGetter(StringBuilder b)
{
return b[50];
}
public void IndexerSetter(StringBuilder b)
{
b[42] = 'b';
}
}
}

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

@ -66,8 +66,8 @@ @@ -66,8 +66,8 @@
.event [mscorlib]System.Action Event
{
.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)
.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()
{
@ -109,8 +109,8 @@ @@ -109,8 +109,8 @@
.event [mscorlib]System.EventHandler ThisIsAnAbstractEvent
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/BaseClass::remove_ThisIsAnAbstractEvent(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/BaseClass::add_ThisIsAnAbstractEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/BaseClass::remove_ThisIsAnAbstractEvent(class [mscorlib]System.EventHandler)
} // end of event BaseClass::ThisIsAnAbstractEvent
} // end of class BaseClass
@ -299,8 +299,8 @@ @@ -299,8 +299,8 @@
} // 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/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()
.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()
{
@ -449,8 +449,8 @@ @@ -449,8 +449,8 @@
.event [mscorlib]System.Action Event
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::remove_Event(class [mscorlib]System.Action)
.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()
{
@ -462,8 +462,8 @@ @@ -462,8 +462,8 @@
} // end of property Impl::SetterOnly
.property instance int32 Test()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_Test(int32)
.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
@ -496,8 +496,8 @@ @@ -496,8 +496,8 @@
} // end of event IChange::Changed
.property instance int32 Property()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::set_Property(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::get_Property()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::set_Property(int32)
} // end of property IChange::Property
} // end of class IChange
@ -591,8 +591,8 @@ @@ -591,8 +591,8 @@
} // end of event Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.Changed
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.Property()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.get_Property()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.set_Property(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.get_Property()
} // end of property Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.Property
} // end of class Change
@ -602,6 +602,8 @@ @@ -602,6 +602,8 @@
.field private notserialized class [mscorlib]System.EventHandler AutomaticEventWithInitializer
.field private int32 '<Value>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<AutomaticProperty>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static class [mscorlib]System.EventHandler 'CS$<>9__CachedAnonymousMethodDelegate1'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname instance int32
@ -632,6 +634,63 @@ @@ -632,6 +634,63 @@
IL_0007: ret
} // end of method PropertiesAndEvents::set_Value
.method public hidebysig specialname instance int32
get_AutomaticProperty() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 11 (0xb)
.maxstack 1
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method PropertiesAndEvents::get_AutomaticProperty
.method public hidebysig specialname instance void
set_AutomaticProperty(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0007: ret
} // end of method PropertiesAndEvents::set_AutomaticProperty
.method public hidebysig specialname instance int32
get_CustomProperty() cil managed
{
// Code size 12 (0xc)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method PropertiesAndEvents::get_CustomProperty
.method public hidebysig specialname instance void
set_CustomProperty(int32 'value') cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
IL_0008: nop
IL_0009: ret
} // end of method PropertiesAndEvents::set_CustomProperty
.method private hidebysig specialname instance void
set_Issue1221(object 'value') cil managed
{
@ -870,6 +929,67 @@ @@ -870,6 +929,67 @@
IL_0009: ret
} // end of method PropertiesAndEvents::remove_CustomEvent
.method public hidebysig instance int32
Getter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 12 (0xc)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: callvirt instance int32 [mscorlib]System.Text.StringBuilder::get_Length()
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method PropertiesAndEvents::Getter
.method public hidebysig instance void
Setter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 11 (0xb)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.s 100
IL_0004: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Capacity(int32)
IL_0009: nop
IL_000a: ret
} // end of method PropertiesAndEvents::Setter
.method public hidebysig instance char
IndexerGetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 14 (0xe)
.maxstack 2
.locals init (char V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.s 50
IL_0004: callvirt instance char [mscorlib]System.Text.StringBuilder::get_Chars(int32)
IL_0009: stloc.0
IL_000a: br.s IL_000c
IL_000c: ldloc.0
IL_000d: ret
} // end of method PropertiesAndEvents::IndexerGetter
.method public hidebysig instance void
IndexerSetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.s 42
IL_0004: ldc.i4.s 98
IL_0006: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Chars(int32,
char)
IL_000b: nop
IL_000c: ret
} // end of method PropertiesAndEvents::IndexerSetter
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
@ -907,32 +1027,42 @@ @@ -907,32 +1027,42 @@
.event [mscorlib]System.EventHandler AutomaticEvent
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEvent(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEvent(class [mscorlib]System.EventHandler)
} // 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
{
.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)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_CustomEvent(class [mscorlib]System.EventHandler)
} // end of event PropertiesAndEvents::CustomEvent
.property instance int32 Value()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Value()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Value(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Value()
} // end of property PropertiesAndEvents::Value
.property instance int32 AutomaticProperty()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
} // end of property PropertiesAndEvents::AutomaticProperty
.property instance int32 CustomProperty()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_CustomProperty()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_CustomProperty(int32)
} // end of property PropertiesAndEvents::CustomProperty
.property instance object Issue1221()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Issue1221(object)
} // end of property PropertiesAndEvents::Issue1221
.property instance object Item()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Item()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Item(object)
.get instance object ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Item()
} // end of property PropertiesAndEvents::Item
.property instance int32 NotAnAutoProperty()
{

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

@ -66,8 +66,8 @@ @@ -66,8 +66,8 @@
.event [mscorlib]System.Action Event
{
.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)
.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()
{
@ -109,8 +109,8 @@ @@ -109,8 +109,8 @@
.event [mscorlib]System.EventHandler ThisIsAnAbstractEvent
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/BaseClass::remove_ThisIsAnAbstractEvent(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/BaseClass::add_ThisIsAnAbstractEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/BaseClass::remove_ThisIsAnAbstractEvent(class [mscorlib]System.EventHandler)
} // end of event BaseClass::ThisIsAnAbstractEvent
} // end of class BaseClass
@ -281,8 +281,8 @@ @@ -281,8 +281,8 @@
} // 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/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()
.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()
{
@ -415,8 +415,8 @@ @@ -415,8 +415,8 @@
.event [mscorlib]System.Action Event
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::remove_Event(class [mscorlib]System.Action)
.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()
{
@ -428,8 +428,8 @@ @@ -428,8 +428,8 @@
} // end of property Impl::SetterOnly
.property instance int32 Test()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Impl::set_Test(int32)
.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
@ -462,8 +462,8 @@ @@ -462,8 +462,8 @@
} // end of event IChange::Changed
.property instance int32 Property()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::set_Property(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::get_Property()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IChange::set_Property(int32)
} // end of property IChange::Property
} // end of class IChange
@ -550,8 +550,8 @@ @@ -550,8 +550,8 @@
} // end of event Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.Changed
.property instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.Property()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.get_Property()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.set_Property(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.get_Property()
} // end of property Change::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IChange.Property
} // end of class Change
@ -561,6 +561,8 @@ @@ -561,6 +561,8 @@
.field private notserialized class [mscorlib]System.EventHandler AutomaticEventWithInitializer
.field private int32 '<Value>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<AutomaticProperty>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static class [mscorlib]System.EventHandler 'CS$<>9__CachedAnonymousMethodDelegate1'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname instance int32
@ -586,6 +588,50 @@ @@ -586,6 +588,50 @@
IL_0007: ret
} // end of method PropertiesAndEvents::set_Value
.method public hidebysig specialname instance int32
get_AutomaticProperty() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0006: ret
} // end of method PropertiesAndEvents::get_AutomaticProperty
.method public hidebysig specialname instance void
set_AutomaticProperty(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0007: ret
} // end of method PropertiesAndEvents::set_AutomaticProperty
.method public hidebysig specialname instance int32
get_CustomProperty() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
IL_0006: ret
} // end of method PropertiesAndEvents::get_CustomProperty
.method public hidebysig specialname instance void
set_CustomProperty(int32 'value') cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
IL_0007: ret
} // end of method PropertiesAndEvents::set_CustomProperty
.method private hidebysig specialname instance void
set_Issue1221(object 'value') cil managed
{
@ -782,6 +828,51 @@ @@ -782,6 +828,51 @@
IL_0007: ret
} // end of method PropertiesAndEvents::remove_CustomEvent
.method public hidebysig instance int32
Getter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance int32 [mscorlib]System.Text.StringBuilder::get_Length()
IL_0006: ret
} // end of method PropertiesAndEvents::Getter
.method public hidebysig instance void
Setter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.s 100
IL_0003: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Capacity(int32)
IL_0008: ret
} // end of method PropertiesAndEvents::Setter
.method public hidebysig instance char
IndexerGetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.s 50
IL_0003: callvirt instance char [mscorlib]System.Text.StringBuilder::get_Chars(int32)
IL_0008: ret
} // end of method PropertiesAndEvents::IndexerGetter
.method public hidebysig instance void
IndexerSetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 11 (0xb)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.s 42
IL_0003: ldc.i4.s 98
IL_0005: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Chars(int32,
char)
IL_000a: ret
} // end of method PropertiesAndEvents::IndexerSetter
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
@ -815,32 +906,42 @@ @@ -815,32 +906,42 @@
.event [mscorlib]System.EventHandler AutomaticEvent
{
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEvent(class [mscorlib]System.EventHandler)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_AutomaticEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::remove_AutomaticEvent(class [mscorlib]System.EventHandler)
} // 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
{
.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)
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::add_CustomEvent(class [mscorlib]System.EventHandler)
} // end of event PropertiesAndEvents::CustomEvent
.property instance int32 Value()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Value()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Value(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Value()
} // end of property PropertiesAndEvents::Value
.property instance int32 AutomaticProperty()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
} // end of property PropertiesAndEvents::AutomaticProperty
.property instance int32 CustomProperty()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_CustomProperty()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_CustomProperty(int32)
} // end of property PropertiesAndEvents::CustomProperty
.property instance object Issue1221()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Issue1221(object)
} // end of property PropertiesAndEvents::Issue1221
.property instance object Item()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Item()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Item(object)
.get instance object ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Item()
} // end of property PropertiesAndEvents::Item
.property instance int32 NotAnAutoProperty()
{

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

@ -576,7 +576,7 @@ @@ -576,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__29_0'
.field public static class [mscorlib]System.EventHandler '<>9__40_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
@ -598,13 +598,13 @@ @@ -598,13 +598,13 @@
} // end of method '<>c'::.ctor
.method assembly hidebysig instance void
'<.ctor>b__29_0'(object '<p0>',
'<.ctor>b__40_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__29_0'
} // end of method '<>c'::'<.ctor>b__40_0'
} // end of class '<>c'
@ -612,6 +612,8 @@ @@ -612,6 +612,8 @@
.field private object issue1221
.field private int32 '<Value>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<AutomaticProperty>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private class [mscorlib]System.EventHandler AutomaticEvent
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private notserialized class [mscorlib]System.EventHandler AutomaticEventWithInitializer
@ -639,6 +641,50 @@ @@ -639,6 +641,50 @@
IL_0007: ret
} // end of method PropertiesAndEvents::set_Value
.method public hidebysig specialname instance int32
get_AutomaticProperty() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0006: ret
} // end of method PropertiesAndEvents::get_AutomaticProperty
.method public hidebysig specialname instance void
set_AutomaticProperty(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0007: ret
} // end of method PropertiesAndEvents::set_AutomaticProperty
.method public hidebysig specialname instance int32
get_CustomProperty() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
IL_0006: ret
} // end of method PropertiesAndEvents::get_CustomProperty
.method public hidebysig specialname instance void
set_CustomProperty(int32 'value') cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
IL_0007: ret
} // end of method PropertiesAndEvents::set_CustomProperty
.method private hidebysig specialname instance void
set_Issue1221(object 'value') cil managed
{
@ -839,24 +885,69 @@ @@ -839,24 +885,69 @@
IL_0007: ret
} // end of method PropertiesAndEvents::remove_CustomEvent
.method public hidebysig instance int32
Getter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance int32 [mscorlib]System.Text.StringBuilder::get_Length()
IL_0006: ret
} // end of method PropertiesAndEvents::Getter
.method public hidebysig instance void
Setter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.s 100
IL_0003: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Capacity(int32)
IL_0008: ret
} // end of method PropertiesAndEvents::Setter
.method public hidebysig instance char
IndexerGetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.s 50
IL_0003: callvirt instance char [mscorlib]System.Text.StringBuilder::get_Chars(int32)
IL_0008: ret
} // end of method PropertiesAndEvents::IndexerGetter
.method public hidebysig instance void
IndexerSetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 11 (0xb)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.s 42
IL_0003: ldc.i4.s 98
IL_0005: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Chars(int32,
char)
IL_000a: ret
} // end of method PropertiesAndEvents::IndexerSetter
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// 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__29_0'
IL_0001: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__40_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__29_0'(object,
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<.ctor>b__40_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__29_0'
IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__40_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()
@ -883,6 +974,16 @@ @@ -883,6 +974,16 @@
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Value()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Value(int32)
} // end of property PropertiesAndEvents::Value
.property instance int32 AutomaticProperty()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
} // end of property PropertiesAndEvents::AutomaticProperty
.property instance int32 CustomProperty()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_CustomProperty()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_CustomProperty(int32)
} // end of property PropertiesAndEvents::CustomProperty
.property instance object Issue1221()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Issue1221(object)

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

@ -596,7 +596,7 @@ @@ -596,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__29_0'
.field public static class [mscorlib]System.EventHandler '<>9__40_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
@ -619,14 +619,14 @@ @@ -619,14 +619,14 @@
} // end of method '<>c'::.ctor
.method assembly hidebysig instance void
'<.ctor>b__29_0'(object '<p0>',
'<.ctor>b__40_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__29_0'
} // end of method '<>c'::'<.ctor>b__40_0'
} // end of class '<>c'
@ -635,6 +635,9 @@ @@ -635,6 +635,9 @@
.field private int32 '<Value>k__BackingField'
.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 int32 '<AutomaticProperty>k__BackingField'
.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 AutomaticEvent
.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 )
@ -664,6 +667,58 @@ @@ -664,6 +667,58 @@
IL_0007: ret
} // end of method PropertiesAndEvents::set_Value
.method public hidebysig specialname instance int32
get_AutomaticProperty() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0006: ret
} // end of method PropertiesAndEvents::get_AutomaticProperty
.method public hidebysig specialname instance void
set_AutomaticProperty(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::'<AutomaticProperty>k__BackingField'
IL_0007: ret
} // end of method PropertiesAndEvents::set_AutomaticProperty
.method public hidebysig specialname instance int32
get_CustomProperty() cil managed
{
// Code size 12 (0xc)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method PropertiesAndEvents::get_CustomProperty
.method public hidebysig specialname instance void
set_CustomProperty(int32 'value') cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
IL_0008: nop
IL_0009: ret
} // end of method PropertiesAndEvents::set_CustomProperty
.method private hidebysig specialname instance void
set_Issue1221(object 'value') cil managed
{
@ -876,24 +931,85 @@ @@ -876,24 +931,85 @@
IL_0009: ret
} // end of method PropertiesAndEvents::remove_CustomEvent
.method public hidebysig instance int32
Getter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 12 (0xc)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: callvirt instance int32 [mscorlib]System.Text.StringBuilder::get_Length()
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method PropertiesAndEvents::Getter
.method public hidebysig instance void
Setter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 11 (0xb)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.s 100
IL_0004: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Capacity(int32)
IL_0009: nop
IL_000a: ret
} // end of method PropertiesAndEvents::Setter
.method public hidebysig instance char
IndexerGetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 14 (0xe)
.maxstack 2
.locals init (char V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.s 50
IL_0004: callvirt instance char [mscorlib]System.Text.StringBuilder::get_Chars(int32)
IL_0009: stloc.0
IL_000a: br.s IL_000c
IL_000c: ldloc.0
IL_000d: ret
} // end of method PropertiesAndEvents::IndexerGetter
.method public hidebysig instance void
IndexerSetter(class [mscorlib]System.Text.StringBuilder b) cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.s 42
IL_0004: ldc.i4.s 98
IL_0006: callvirt instance void [mscorlib]System.Text.StringBuilder::set_Chars(int32,
char)
IL_000b: nop
IL_000c: ret
} // end of method PropertiesAndEvents::IndexerSetter
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// 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__29_0'
IL_0001: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__40_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__29_0'(object,
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<.ctor>b__40_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__29_0'
IL_001b: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/'<>c'::'<>9__40_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()
@ -921,6 +1037,16 @@ @@ -921,6 +1037,16 @@
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_Value()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Value(int32)
} // end of property PropertiesAndEvents::Value
.property instance int32 AutomaticProperty()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_AutomaticProperty()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_AutomaticProperty(int32)
} // end of property PropertiesAndEvents::AutomaticProperty
.property instance int32 CustomProperty()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::get_CustomProperty()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_CustomProperty(int32)
} // end of property PropertiesAndEvents::CustomProperty
.property instance object Issue1221()
{
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents::set_Issue1221(object)

Loading…
Cancel
Save