Header menu logo FCQRS

IActor Type

Defines the core functionalities and context provided by the FCQRS environment to actors. This interface provides access to essential Akka.NET services and FCQRS initialization methods.

Instance members

Instance member Description

this.CreateCommandSubscription

Full Usage: this.CreateCommandSubscription

Parameters:
    arg0 : string -> IEntityRef<obj>
    arg1 : CID
    arg2 : ActorId
    arg3 : 'b
    arg4 : 'c -> bool
    arg5 : Map<string, string> option

Returns: Async<Event<'c>>
Modifiers: abstract
Type parameters: 'b, 'c

Creates a command subscription to wait for a specific event from a target actor. Sends the command and asynchronously returns the first matching event received. Entity factory function for the target actor type. Correlation ID for tracking. Entity ID of the target actor. The command payload to send. A predicate function to select the desired event. Optional metadata to include with the command. An async computation yielding the target event.

arg0 : string -> IEntityRef<obj>
arg1 : CID
arg2 : ActorId
arg3 : 'b
arg4 : 'c -> bool
arg5 : Map<string, string> option
Returns: Async<Event<'c>>

this.InitializeActor

Full Usage: this.InitializeActor

Parameters:
Returns: EntityFac<obj>
Modifiers: abstract
Type parameters: 'a, 'a, 'c, 'b

Initializes a sharded, persistent aggregate actor. Environment configuration (IConfiguration & ILoggerFactory). The initial state for new aggregate instances. The shard type name for this aggregate. The command handler function: `Command -> State -> EventAction`. The event handler function: `Event -> State -> State`. An entity factory (`EntityFac`) for creating instances of this actor.

arg0 : 'a
arg1 : 'a0
arg2 : string
arg3 : Command<'c> -> 'a0 -> EventAction<'b>
arg4 : Event<'b> -> 'a0 -> 'a0
Returns: EntityFac<obj>

this.InitializeSaga

Full Usage: this.InitializeSaga

Parameters:
Returns: EntityFac<obj>
Modifiers: abstract
Type parameters: 'a, 'SagaState, 'State, 'c

Initializes a sharded, persistent saga actor. Environment configuration (IConfiguration & ILoggerFactory). The initial state (`SagaState`) for new saga instances. The event handler function: `Event -> SagaState -> EventAction`. Function determining side effects based on state transitions: `SagaState -> Option -> bool -> Effect * Option * ExecuteCommand list`. Function to apply internal state changes: `SagaState -> SagaState`. The shard type name for this saga. An entity factory (`EntityFac`) for creating instances of this saga.

arg0 : 'a
arg1 : SagaState<'SagaState, 'State>
arg2 : obj -> SagaState<'SagaState, 'State> -> EventAction<'State>
arg3 : SagaState<'SagaState, 'State> -> SagaStartingEvent<Event<'c>> option -> bool -> Effect * 'State option * ExecuteCommand list
arg4 : SagaState<'SagaState, 'State> -> SagaState<'SagaState, 'State>
arg5 : string
Returns: EntityFac<obj>

this.InitializeSagaStarter

Full Usage: this.InitializeSagaStarter

Parameters:
Modifiers: abstract

Initializes the Saga Starter actor, configuring which events trigger which sagas. A function mapping a received event object to a list of saga definitions to start: `obj -> list<(Factory * Prefix * StartingEvent)>`.

arg0 : obj -> ((string -> IEntityRef<obj>) * PrefixConversion * obj) list

this.LoggerFactory

Full Usage: this.LoggerFactory

Returns: ILoggerFactory
Modifiers: abstract

Gets the logger factory.

Returns: ILoggerFactory

this.Materializer

Full Usage: this.Materializer

Returns: ActorMaterializer
Modifiers: abstract

Gets the Akka Streams materializer.

Returns: ActorMaterializer

this.Mediator

Full Usage: this.Mediator

Returns: IActorRef
Modifiers: abstract

Gets the reference to the distributed pub/sub mediator actor.

Returns: IActorRef

this.Stop

Full Usage: this.Stop

Returns: Task
Modifiers: abstract

Stops the actor system gracefully.

Returns: Task

this.SubscribeForCommand

Full Usage: this.SubscribeForCommand

Parameters:
Returns: Async<Event<'b>>
Modifiers: abstract
Type parameters: 'a, 'b

Subscribes to the result of a command sent to another actor.

arg0 : Command<'a, 'b>
Returns: Async<Event<'b>>

this.System

Full Usage: this.System

Returns: ActorSystem
Modifiers: abstract

Gets the hosting ActorSystem.

Returns: ActorSystem

this.TimeProvider

Full Usage: this.TimeProvider

Returns: TimeProvider
Modifiers: abstract

Gets the time provider.

Returns: TimeProvider

Type something to start searching.