Table of Contents

Class DependencyInjectionEventBus

Namespace
ReflectionEventing.DependencyInjection
Assembly
ReflectionEventing.DependencyInjection.dll
public class DependencyInjectionEventBus : EventBus, IEventBus
Inheritance
DependencyInjectionEventBus
Implements
Inherited Members
Extension Methods

Constructors

DependencyInjectionEventBus(QueueProcessorOptionsProvider, IConsumerProvider, IConsumerTypesProvider, IEventsQueue)

public DependencyInjectionEventBus(QueueProcessorOptionsProvider options, IConsumerProvider consumerProviders, IConsumerTypesProvider consumerTypesProvider, IEventsQueue queue)

Parameters

options QueueProcessorOptionsProvider
consumerProviders IConsumerProvider
consumerTypesProvider IConsumerTypesProvider
queue IEventsQueue

Methods

PublishAsync<TEvent>(TEvent, CancellationToken)

Adds the specified event to the queue.Another scope will take over execution as configured.

public override Task PublishAsync<TEvent>(TEvent eventItem, CancellationToken cancellationToken = default) where TEvent : class

Parameters

eventItem TEvent

The event to publish.

cancellationToken CancellationToken

A cancellation token that can be used to cancel the operation.

Returns

Task

A task that represents the asynchronous operation.

Type Parameters

TEvent

The type of the event to publish.

Remarks

The method only adds the event to the execution queue, it does not wait for its successful execution.