Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
 public void Enqueue(InProcessRequest item)
 {
     _queue.Enqueue(item);
 }