private void InnerAddEventSet(EventSet eventSet) { var eventQueue = new EventQueue(); eventQueue.AddEventSet(eventSet); Enqueue(eventQueue); }
public EventSet GetEventSet() { EventSet temp = _eventSet; _eventSet = null; return(temp); }
private void ProcessEvent(EventSet eventSet, FlowEventArgs eventArgs) { if (nextOperation == OperationType.Abort) { return; } try { var source = GetTargetSource(eventSet.EventHandler); Evaluate(source); eventSet.EventHandler.Invoke(eventArgs); Evaluate(source); } catch (FlowExecutionException e) { Error?.Invoke(e); ProcessError(e); if (debugMode) { throw; } } catch (ThreadAbortException) { } catch (Exception e) { var error = new FlowExecutionException(e, eventSet.Source); Error?.Invoke(error); ProcessError(error); } }
public void AddEventSet(EventSet eventSet) { if (queue.Count == 0 && this._eventSet == null) { this._eventSet = eventSet; } else { if (this._eventSet != null) { InnerAddEventSet(this._eventSet); _eventSet = null; } InnerAddEventSet(eventSet); } }
public void AddEventSetToDepth(EventSet eventSet) { var eventQueue = new EventQueue { queue = queue, _eventSet = _eventSet }; this.queue = new Queue <EventQueue>(); this._eventSet = null; this.AddEventSet(eventSet); Enqueue(eventQueue); /*EventQueue eventQueue = new EventQueue(); * eventQueue.AddEventSet(eventSet); * queue.Enqueue(eventQueue); * return eventQueue;*/ }
public void Clear() { queue = new Queue <EventQueue>(); parent = null; _eventSet = null; }
private void ProcessEvent(EventSet eventSet) { ProcessEvent(eventSet, new FlowEventArgs(eventSet.Source, false)); }