private InvocationInterceptor GetInvocationInterceptor() { if (this.defaultInvocationInterceptor == null) { this.defaultInvocationInterceptor = new InvocationInterceptor(); } this.defaultInvocationInterceptor.Cancel = false; this.defaultInvocationInterceptor.Replacement = null; return(this.defaultInvocationInterceptor); }
public IInvocationInterceptor OnInvocation(IAbstractEmitterBlock block, InvocationExpression expression, InvocationResolveResult resolveResult) { InvocationInterceptor interceptor = this.GetInvocationInterceptor(); interceptor.Block = block; interceptor.Expression = expression; interceptor.ResolveResult = resolveResult; foreach (var plugin in this.Parts) { plugin.OnInvocation(interceptor); if (interceptor.Cancel) { return(interceptor); } } return(interceptor); }