Table of Contents

Class ReactorInvoker

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

Represents an implementation of IReactorInvoker.

public class ReactorInvoker : IReactorInvoker
Inheritance
ReactorInvoker
Implements
Inherited Members

Remarks

Initializes a new instance of the ReactorInvoker class.

Constructors

ReactorInvoker(IEventTypes, IReactorMiddlewares, Type, ActivatedArtifact, ILogger<ReactorInvoker>)

Represents an implementation of IReactorInvoker.

public ReactorInvoker(IEventTypes eventTypes, IReactorMiddlewares middlewares, Type targetType, ActivatedArtifact activatedReactor, ILogger<ReactorInvoker> logger)

Parameters

eventTypes IEventTypes

IEventTypes for mapping types.

middlewares IReactorMiddlewares

IReactorMiddlewares to call.

targetType Type

Type of Reactor.

activatedReactor ActivatedArtifact

The ActivatedArtifact activated reactor.

logger ILogger<ReactorInvoker>

ILogger for logging.

Remarks

Initializes a new instance of the ReactorInvoker class.

Methods

GetEventTypesFor(IEventTypes, Type)

Gets all EventType for a specific reactor type.

public static IImmutableList<EventType> GetEventTypesFor(IEventTypes eventTypes, Type reactorType)

Parameters

eventTypes IEventTypes

IEventTypes for looking up event types.

reactorType Type

The reactor Type to get event types for.

Returns

IImmutableList<EventType>

Collection of discovered EventType.

Invoke(object, EventContext)

Invoke the Reactor.

public Task<Catch> Invoke(object content, EventContext eventContext)

Parameters

content object

Event content to invoke with.

eventContext EventContext

EventContext for the event.

Returns

Task<Catch>

Awaitable Task.