Closed ppittle closed 10 years ago
public partial class Mixin { public virtual string GetHelloWorld() { return "Hello World - Updated"; } } public class Interceptor : MixinInterceptorBase { public override void OnBeforeMethodInvocation(object sender, MethodEventArgs eventArgs) { eventArgs.CancellationToken = new CancellationToken { Cancel = true, ReturnValue = "Intercepted" }; } } [pMixin(Mixin = typeof(Mixin), Interceptors = new[] { typeof(Interceptor) })] public partial class Target { }