Esempio n. 1
0
        private void Clear(HttpServerWebSocketContext context, string queue, string id)
        {
            var action = new ClearAction();

            action.actionType = Action.CLEAR;
            action.channel    = (IChannel)context.UserState;
            action.queue      = queue;
            action.id         = id;
            //
            Program.ActionProcessor.Push(action);
        }
Esempio n. 2
0
        private void DO_Clear(ClearAction action)
        {
            var queueHandler = action.queueHandler;

            if (queueHandler == null)
            {
                action.result = "queue not exists.";
            }
            else
            {
                var count = queueHandler.itemQueue.count;
                //
                action.result = Action.RESULT_OK;
                action.count  = count;
                //
                queueHandler.itemQueue.Clear();
            }
            //
            action.channel.Send(action);
        }
Esempio n. 3
0
 private void Clear(ClearAction action)
 {
     this.DO_Clear(action);
 }