private void ApplyPolicies(IInterceptor interceptor, IInterceptingProxy proxy, object target, PolicySet policies) { foreach (MethodImplementationInfo method in interceptor.GetInterceptableMethods(target.GetType(), target.GetType())) { HandlerPipeline pipeline = new HandlerPipeline(policies.GetHandlersFor(method, container)); proxy.SetPipeline(method.ImplementationMethodInfo, pipeline); } }
private void ApplyPolicies(IInterceptor interceptor, IInterceptingProxy proxy, object target, PolicySet policies) { PipelineManager manager = new PipelineManager(); foreach (MethodImplementationInfo method in interceptor.GetInterceptableMethods(target.GetType(), target.GetType())) { HandlerPipeline pipeline = new HandlerPipeline(policies.GetHandlersFor(method, container)); manager.SetPipeline(method.ImplementationMethodInfo, pipeline); } proxy.AddInterceptionBehavior(new PolicyInjectionBehavior(manager)); }