예제 #1
0
 /// <summary>
 ///     Attach an event source to the context in order to forward it's events to the configured pipelines.
 /// </summary>
 /// <param name="source">The event source.</param>
 /// <param name="eventsScope">The scope of the events published from this source.</param>
 public virtual void Attach(object source, EventsScope eventsScope)
 => GetCurrentInternalServiceProvider()
 .GetRequiredService <IAttachingService>()
 .Attach(source, eventsScope);
예제 #2
0
 /// <summary>
 ///     Continues the processing of the events that have been queued.
 /// </summary>
 /// <param name="eventsScope">The scope where the queued events were published.</param>
 /// <param name="queueName">
 ///     The name of the queue.
 ///     If null all the events will be processed.
 /// </param>
 public virtual Task ProcessQueuedEventsAsync(EventsScope eventsScope, string queueName = null)
 => GetCurrentInternalServiceProvider()
 .GetRequiredService <IEventsQueuesService>()
 .ProcessQueuedEventsAsync(eventsScope, queueName);
예제 #3
0
 /// <summary>
 ///     Discards all the events of a queue.
 /// </summary>
 /// <param name="eventsScope">The scope where the queued events were published.</param>
 /// <param name="queueName">
 ///     The name of the queue.
 ///     If null all the events will be discarded.
 /// </param>
 public virtual void DiscardQueuedEvents(EventsScope eventsScope, string queueName = null)
 => GetCurrentInternalServiceProvider()
 .GetRequiredService <IEventsQueuesService>()
 .DiscardQueuedEvents(eventsScope, queueName);