public Proxy <T> OnBefore(Action <IMethodInvocation> action) { Require.ArgumentNotNull("action", action); var callback = new OnBeforeCallback(action); interceptedMembers.ForEach(e => register[e].Add(callback)); return(this); }
/// <summary> /// Called when before. /// </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> OnBefore(Action <IInvocation> action) { Argument.IsNotNull("action", action); var callback = new OnBeforeCallback(action); AddCallBack(callback); return(this); }