David While I recommend playing with IL for a learning experience if you want to use an existing library you can try this http://visualstudiogallery.msdn.microsoft.com/bd351303-db8c-4771-9b22-5e51524fccd3 http://code.google.com/p/notifypropertyweaver/
On Tue, Feb 15, 2011 at 8:16 PM, David Turczi <[email protected]> wrote: > Hi! > > I'm working on weaving property notification using mono-cecil. My > first problem was calling a base class method, when the base class is > in an other assembly. Then, I got help on StackOverflow (from Jb > Evain): > > TypeDefinition type = ...; > TypeDefintion baseType = type.BaseType.Resolve (); > MethodDefinition baseMethod = baseType.Methods.First (m => ...); > MethodReference baseMethodReference = type.Module.Import (baseMethod); > il.Emit (OpCodes.Call, baseMethodReference); > > Now, I have a similiar problem: I'm trying to call a GENERIC base > class' method. Like this: > > //in Assembly A > class BaseVM<T> {} > > //in Assembly B > class MyVM : Base<SomeModel> { > [NotifyProperty] > public string Something {get;set;} > } > > It weaves the following code: > > L_000e: call instance void > [AssemblyA]Base`1::RaisePropertyChanged(string) > instead of > L_000e: call instance void [AssemblyA]Base`1<class > SomeModel>::RaisePropertyChanged(string) > > > What is there to change? > > -- > -- > mono-cecil -- -- mono-cecil
