Ejemplo n.º 1
0
        public Proxy <T> OnFinally(Action <IMethodInvocation> action)
        {
            Require.ArgumentNotNull("action", action);
            var callback = new OnFinallyCallback(action);

            interceptedMembers.ForEach(e => register[e].Add(callback));
            return(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Called when finally.
        /// </summary>
        /// <param name="action">The action.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">The <paramref name="action"/> is <c>null</c>.</exception>
        public ICallbackHandler <TService, TServiceImplementation> OnFinally(Action <IInvocation> action)
        {
            Argument.IsNotNull("action", action);

            var callback = new OnFinallyCallback(action);

            AddCallBack(callback);
            return(this);
        }