public void RemoveAction(params AfterDelegate <T>[] actions) { for (int i = 0; i < actions.Length; i++) { AfterChange -= actions[i]; } }
public NextVar(T value, BeforeDelegate <T> before, OnChangeDelegate <T> onChange, AfterDelegate <T> after) { val = value; BeforeChange = before; OnChange = onChange; AfterChange = after; }
public void AddAction(AfterDelegate <T> action, bool executeNow) { AfterChange += action; if (executeNow) { action(val); } }
private object InterceptAfterDelegate(object currentInterceptor) { AfterDelegate interceptor = (AfterDelegate)currentInterceptor; Step++; object res = Proceed(); interceptor(new AfterMethodInvocation(this)); return(res); }
public NextVar(T value, AfterDelegate <T> after, OnChangeDelegate <T> onChange) { val = value; OnChange = onChange; AfterChange = after; }
public NextVar(T value, AfterDelegate <T> after) { val = value; AfterChange = after; }
/// <summary> /// Define o método a ser executado ao invés do método atual /// </summary> /// <param name="afterAction">Método a ser executado ao invés do método atual</param> /// <returns>Esta instância</returns> IFluentProxyExecuters <T> IFluentProxyExecuters <T> .ExecuteAfter(AfterDelegate <T> afterAction) { CheckIfHasCurrentMethod(); _actions[_currentMethod].AfterActions += afterAction; return(this); }