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); }
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); }