Exemplo n.º 1
0
        protected override object OnExecute(CommandContext context)
        {
            var poller = QueuePollerCommand.FindPoller(context.CommandNode);

            if (poller == null)
            {
                throw new CommandException($"The queue poller not found.");
            }

            poller.Stop();
            return(null);
        }
Exemplo n.º 2
0
        protected override object OnExecute(CommandContext context)
        {
            var poller = QueuePollerCommand.FindPoller(context.CommandNode);

            if (poller == null)
            {
                throw new CommandException($"The queue poller not found.");
            }

            if (context.CommandNode.FindQueue() is IMessageQueue <MessageQueueMessage> queue)
            {
                poller.Queue = queue;
            }

            poller.Start();
            return(poller);
        }