示例#1
0
 public void RemoveAction(params AfterDelegate <T>[] actions)
 {
     for (int i = 0; i < actions.Length; i++)
     {
         AfterChange -= actions[i];
     }
 }
示例#2
0
 public NextVar(T value, BeforeDelegate <T> before, OnChangeDelegate <T> onChange, AfterDelegate <T> after)
 {
     val          = value;
     BeforeChange = before;
     OnChange     = onChange;
     AfterChange  = after;
 }
示例#3
0
        public void AddAction(AfterDelegate <T> action, bool executeNow)
        {
            AfterChange += action;

            if (executeNow)
            {
                action(val);
            }
        }
示例#4
0
        private object InterceptAfterDelegate(object currentInterceptor)
        {
            AfterDelegate interceptor = (AfterDelegate)currentInterceptor;

            Step++;
            object res = Proceed();

            interceptor(new AfterMethodInvocation(this));

            return(res);
        }
示例#5
0
 public NextVar(T value, AfterDelegate <T> after, OnChangeDelegate <T> onChange)
 {
     val         = value;
     OnChange    = onChange;
     AfterChange = after;
 }
示例#6
0
 public NextVar(T value, AfterDelegate <T> after)
 {
     val         = value;
     AfterChange = after;
 }
示例#7
0
 /// <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);
 }