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

            if (executeNow)
            {
                action(val, val);
            }
        }
Exemplo n.º 4
0
        private object InterceptBeforeDelegate(object currentInterceptor)
        {
            BeforeDelegate interceptor = (BeforeDelegate)currentInterceptor;

            interceptor(new BeforeMethodInvocation(this));
            Step++;
            object res = Proceed();

            return(res);
        }
Exemplo n.º 5
0
 public NextVar(T value, BeforeDelegate <T> before, OnChangeDelegate <T> onChange)
 {
     val          = value;
     BeforeChange = before;
     OnChange     = onChange;
 }
Exemplo n.º 6
0
 public NextVar(T value, BeforeDelegate <T> before)
 {
     val          = value;
     BeforeChange = before;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Define o método a ser executado antes do método atual
 /// </summary>
 /// <param name="beforeAction">Método a ser executado antes do método atual</param>
 /// <returns>Esta instância</returns>
 IFluentProxyExecuters <T> IFluentProxyExecuters <T> .ExecuteBefore(BeforeDelegate <T> beforeAction)
 {
     CheckIfHasCurrentMethod();
     _actions[_currentMethod].BeforeActions += beforeAction;
     return(this);
 }