internal void AddAll(A?action, DFlowAction method) { foreach (var state in actions.Keys) { if (!actions[state].ContainsKey(action)) { actions[state].Add(action, new List <ActionHolder>()); } actions[state][action].Add(new ActionHolder(__id++, method)); actions[state][action].Sort((a, b) => b.Id - a.Id); } }
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)); } }
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); } } }
internal void Add(S?state, A?action, DFlowAction method) { if (state == null) { AddAll(action, method); return; } if (!actions.ContainsKey(state)) { actions.Add(state, new NullableDict <A?, List <ActionHolder> >()); } if (!actions[state].ContainsKey(action)) { actions[state].Add(action, new List <ActionHolder>()); } actions[state][action].Add(new ActionHolder(__id++, method)); actions[state][action].Sort((a, b) => b.Id - a.Id); }
public ExceptionHolder(Type throwable, DFlowAction action) { Action = action; Throwable = throwable; EAction = null; }
public ActionHolder(int id, DFlowAction method) { Id = id; Method = method; }