Jb Thanks for the prompt reply
Attached is the two files in question
There are two classes
ClassWithProperties : which the injection code works for
ClassNotifyBase : which the injection code does not work
and here is the IL for the failing property set
.method public hidebysig specialname instance void
set_Property1(string 'value') cil managed
{
.custom instance void
[mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
.maxstack 8
L_0000: nop
L_0001: ldarg.0
L_0002: ldarg.1
L_0003: stfld string
AssemblyToProcess.ClassNotifyBase::<Property1>k__BackingField
L_0008: ldarg.0
L_0009: ldstr "Property1"
L_000e: call instance void
AssemblyToProcess.ClassWithProperties::remove_PropertyChanged(class
[System]System.ComponentModel.PropertyChangedEventHandler)
L_0013: nop
L_0014: ret
}
On Thu, Jun 10, 2010 at 2:00 AM, Jb Evain <[email protected]> wrote:
> Hey,
>
> On Jun 9, 1:59 pm, Simon <[email protected]> wrote:
>> So what am i doing wrong?
>
> Probably emitting the wrong IL. What does it look like (C# from
> reflector doesn't help much sadly) ?
>
> --
> Jb Evain <[email protected]>
>
> --
> --
> mono-cecil
--
--
mono-cecil
AssemblyToProcess.dll
Description: Binary data
AssemblyToProcess.pdb
Description: Protein Databank data
