Exemplo n.º 1
0
        private void InnerAddEventSet(EventSet eventSet)
        {
            var eventQueue = new EventQueue();

            eventQueue.AddEventSet(eventSet);
            Enqueue(eventQueue);
        }
Exemplo n.º 2
0
        public EventSet GetEventSet()
        {
            EventSet temp = _eventSet;

            _eventSet = null;
            return(temp);
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
        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;*/
        }
Exemplo n.º 6
0
 public void Clear()
 {
     queue     = new Queue <EventQueue>();
     parent    = null;
     _eventSet = null;
 }
Exemplo n.º 7
0
 private void ProcessEvent(EventSet eventSet)
 {
     ProcessEvent(eventSet, new FlowEventArgs(eventSet.Source, false));
 }