Beispiel #1
0
 internal void AddExcept(S?state, Type throwable, DFlowAction method = null, DFlowExceptionAction eMethod = null)
 {
     if (state == null)
     {
         AddAllExcept(throwable, method, eMethod);
         return;
     }
     if (method != null)
     {
         exceptions[state].Add(new ExceptionHolder(throwable, method));
     }
     if (eMethod != null)
     {
         exceptions[state].Add(new ExceptionHolder(throwable, eMethod));
     }
 }
Beispiel #2
0
        internal void AddAllExcept(Type throwable, DFlowAction method = null, DFlowExceptionAction eMethod = null)
        {
            var h  = method != null ? new ExceptionHolder(throwable, method) : null;
            var eh = eMethod != null ? new ExceptionHolder(throwable, eMethod) : null;

            foreach (var list in exceptions.Values)
            {
                if (h != null)
                {
                    list.Add(h);
                }
                if (eh != null)
                {
                    list.Add(eh);
                }
            }
        }
Beispiel #3
0
 public ExceptionHolder(Type throwable, DFlowExceptionAction action)
 {
     Action    = null;
     Throwable = throwable;
     EAction   = action;
 }