Exemplo n.º 1
0
        /// <summary>
        /// The process.
        /// </summary>
        /// <param name="invocation">
        /// The invocation.
        /// </param>
        /// <param name="interceptedContext">
        /// The intercepted context.
        /// </param>
        public virtual void Process(IInvocation invocation, CoreInterceptContext interceptedContext)
        {
            this.ForEach(obj => obj.PreProcess(invocation, interceptedContext));
            var invokeTargetDelegate = DelegateInvoker.CreateInvoker(interceptedContext.Target, invocation.Method);

            invocation.ReturnValue = invokeTargetDelegate.Call(invocation.Arguments);
            this.ForEach(obj => obj.PostProcess(invocation, interceptedContext));
        }
Exemplo n.º 2
0
 public virtual void Process(IInvocation invocation, CoreInterceptContext interceptedContext)
 {
     ForEach(obj => obj.PreProcess(invocation, interceptedContext));
     invocation.ReturnValue = invocation.Method.Invoke(interceptedContext.Target, invocation.Arguments);
     ForEach(obj => obj.PostProcess(invocation, interceptedContext));
 }