Class ReactorMiddlewares

Namespace
Cratis.Chronicle.Reactors
Assembly
Cratis.Chronicle.dll

Represents an implementation of IReactorMiddlewares.

[IgnoreConvention]
public class ReactorMiddlewares : IReactorMiddlewares, IAsyncDisposable
Inheritance
ReactorMiddlewares
Implements
Inherited Members
Extension Methods

Remarks

Initializes a new instance of the ReactorMiddlewares class.

Constructors

ReactorMiddlewares(ActivatedArtifact<IReactorMiddleware>[])

Represents an implementation of IReactorMiddlewares.

public ReactorMiddlewares(ActivatedArtifact<IReactorMiddleware>[] activatedMiddlewares)

Parameters

activatedMiddlewares ActivatedArtifact<IReactorMiddleware>[]

The ActivatedArtifact<T> of IReactorMiddleware.

Remarks

Initializes a new instance of the ReactorMiddlewares class.

Methods

AfterInvoke(EventContext, object)

Invoked after the actual invoke.

public Task AfterInvoke(EventContext eventContext, object @event)

Parameters

eventContext EventContext

EventContext for the event.

event object

The actual event that it will be called with.

Returns

Task

A Task representing the result of the asynchronous operation.

AfterInvoke(ReactorId, EventContext, object)

Invoked after the actual invoke, for a known reactor.

public Task AfterInvoke(ReactorId reactorId, EventContext eventContext, object @event)

Parameters

reactorId ReactorId

The ReactorId of the reactor the event was observed for.

eventContext EventContext

EventContext for the event.

event object

The actual event that it will be called with.

Returns

Task

A Task representing the result of the asynchronous operation.

BeforeInvoke(EventContext, object)

Invoked before the actual invoke.

public Task BeforeInvoke(EventContext eventContext, object @event)

Parameters

eventContext EventContext

EventContext for the event.

event object

The actual event that it will be called with.

Returns

Task

A Task representing the result of the asynchronous operation.

BeforeInvoke(ReactorId, EventContext, object)

Invoked before the actual invoke, for a known reactor.

public Task BeforeInvoke(ReactorId reactorId, EventContext eventContext, object @event)

Parameters

reactorId ReactorId

The ReactorId of the reactor the event is being observed for.

eventContext EventContext

EventContext for the event.

event object

The actual event that it will be called with.

Returns

Task

A Task representing the result of the asynchronous operation.

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask