Exemplo n.º 1
0
        private void Count(HttpServerWebSocketContext context, string queue, string id)
        {
            var action = new CountAction();

            action.actionType = Action.COUNT;
            action.channel    = (IChannel)context.UserState;
            action.queue      = queue;
            action.id         = id;
            //
            Program.ActionProcessor.Push(action);
        }
Exemplo n.º 2
0
        private void DO_Count(CountAction 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;
            }
            //
            action.channel.Send(action);
        }
Exemplo n.º 3
0
 private void Count(CountAction action)
 {
     this.DO_Count(action);
 }