Пример #1
0
        //Send Message to client
        public virtual void CycleResponse()
        {
            if (stack.CurrentDirect == FlowDirect.WaitingOutput)
            {
                BaseDCTAction action = stack.GetNextAction();

                try
                {
                    stack.SendMessage(client, action.Do(client), string.Empty);
                }
                catch (Exception ex)
                {
                    UserControl.Messages msg = new UserControl.Messages();
                    msg.Add(new UserControl.Message(ex));
                    stack.SendMessage(client, msg, string.Empty);
                }
            }
        }
Пример #2
0
        public virtual BaseDCTAction GetNextAction()
        {
            BaseDCTAction action = null;

            if (_WorkingActionList.Count > 0)
            {
                action = (BaseDCTAction)_WorkingActionList[0];

                while (action != null && action.Status == ActionStatus.Pass)
                {
                    _WorkingActionList.Clear();
                    _WorkingActionList.Add(action.NextAction);
                    action = null;
                    action = (BaseDCTAction)_WorkingActionList[0];
                }
            }

            return(action);
        }
Пример #3
0
 public virtual void ResetActionStack(BaseDCTAction action)
 {
     _WorkingActionList.Clear();
     _WorkingActionList.Add(action);
 }