示例#1
0
        public Task EnqueueAsync(IEvent @event, CancellationToken cancellationToken = default,
                                 QueueOptions options = null)
        {
            var request = new InProcessRequest(@event, options);

            _queues[request.GetPriority()].Enqueue(request);
            return(Task.CompletedTask);
        }
示例#2
0
        public Task EnqueueAsync <TResult>(ICommand <TResult> command, CancellationToken cancellationToken = default,
                                           QueueOptions options = null)
        {
            var request = new InProcessRequest(command, options);

            _queues[request.GetPriority()].Enqueue(request);
            return(Task.CompletedTask);
        }