I could not find the information in the wiki so I'm asking here.
I created a small Property Attribute to intercept Properties :
[AttributeUsage(AttributeTargets.Property)]
public sealed class ViewContextAttribute : Attribute, IPropertyInterceptor, IPropertyInterceptorInitialize, IMethodInterceptor, IMethodInterceptorOnExit
{
[AssignMethod("Get{Name}", true)]
public Func<bool> _onGetProperty;
...
}
When it complies, everything works fine, but I was wondering if when the AssignMethod is found, it could wrap it with the MethodInterceptor functionalities?
[ViewContext()]
public bool IsDraggingEnabled => GetIsDraggingEnabled();
In other words, I want to override the return value of IsDraggingEnabled but never loose the actual value of GetIsDraggingEnabled();
Is it something possible?
Thanks for your help.
Simon
Hi all,
I could not find the information in the wiki so I'm asking here.
I created a small Property Attribute to intercept Properties :
When it complies, everything works fine, but I was wondering if when the AssignMethod is found, it could wrap it with the MethodInterceptor functionalities?
In other words, I want to override the return value of
IsDraggingEnabled
but never loose the actual value ofGetIsDraggingEnabled();
Is it something possible? Thanks for your help. Simon