Yeah, I mainly do it to learn, and also my requirements were simple. But it would be interesting to see how the referenced addin finds FullName to be raised on GivenName's change... Maybe someday I'll look into it. (Also it doesnt mention anything about what if the BASE class implements INotifyPropertyChanged...)
On febr. 15, 11:01, Simon Cropp <[email protected]> wrote: > David > > While I recommend playing with IL for a learning experience if you > want to use an existing library you can try > thishttp://visualstudiogallery.msdn.microsoft.com/bd351303-db8c-4771-9b22...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
