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);
        }
        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);
        }
 private void Count(CountAction action)
 {
     this.DO_Count(action);
 }