public Proxy <T> OnInvoke(Action <IMethodInvocation> action) { Require.ArgumentNotNull("action", action); var callback = new OnInvokeCallback(action); interceptedMembers.ForEach(e => register[e].Add(callback)); return(this); }
/// <summary> /// Called when invoke. /// </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> OnInvoke(Action <IInvocation> action) { Argument.IsNotNull("action", action); var callback = new OnInvokeCallback(action); AddCallBack(callback); return(this); }
public CallbackAction(LocalKey intentKey = null, OnInvokeCallback onInvoke = null) : base(intentKey: intentKey) { D.assert(onInvoke != null); this.onInvoke = onInvoke; }