Header menu logo FCQRS

FCQRS Namespace

Functionality for Write Side.

Type/Module Description

Actor

ActorSerialization

AkkaTimeProvider

AsyncTaskExtensions

Top-level Async->Task conversion, discoverable from C# as `someAsync.AsTask()` (`using FCQRS;`). Replaces the non-discoverable FCQRS.CSharp.AsyncExtensions.

Common

Contains common types like Events and Commands

CSharp

C# interoperability helpers for FCQRS Provides simpler APIs for consuming FCQRS from C#

DynamicConfig

FcqrsBuilder

Fluent registration builder. Each AddXxx records a step to run at startup and, where relevant, registers the resolved piece (Handler, refs, subscription) in DI. Returned by IServiceCollection.AddFcqrs.

FcqrsBuilderExtensions

 Single-type-argument forms of AddAggregate / AddSaga. The concrete class
 already names its state/command/event types on its Aggregate<,,> / Saga<,,>
 base, so registration repeats none of them:

     .AddAggregate()
     .AddSaga(create: sp => new QuotaSaga(...), startOn: e => ...)   // TSaga inferred

 Reflection runs once per registration, while the host is being composed —
 nothing on the message path. The four-type-argument instance overloads remain
 for classes that acquire the base generically.

FcqrsRuntime

Runtime registry, populated once at host startup. Holds the live actor system, each aggregate's factory + refs (keyed by the aggregate's CLR type) and the projection subscription. Resolved from DI so endpoints can pull the Handlers / the subscription, and saga registrations can look up the aggregates they wire.

FcqrsServiceCollectionExtensions

`services.AddFcqrs(...)` and `serviceProvider.Aggregate<T>()`.

FSharp

 Idiomatic-F# functional facade for FCQRS.

 Gives F# consumers the same one-call ergonomics the C# host-builder
 (HostExtensions.fs) gives C#, but with F# idioms: records-of-functions for the
 definitions, typed handles for the results, an explicit wiring pipeline, and
 plain helpers for saga side effects. It is a *pure addition* — it wraps only the
 existing primitives (IActor.InitializeActor / SagaBuilder.initSimple / Query.init
 / InitializeSagaStarter / CreateCommandSubscription / Actor.api) and changes
 nothing in the C# interop layer or the core.

     open FCQRS.FSharp
     let api       = Fcqrs.actor config loggerFactory (Some (Fcqrs.connect DBType.Sqlite conn)) "Cluster"
     let documents = Fcqrs.aggregate api { Name="Document"; Initial=...; Decide=...; Fold=... }
     let users     = Fcqrs.aggregate api { Name="User"; ... }
     let quota     = Fcqrs.saga api (quotaDef documents.Factory users.Factory)
     Fcqrs.wireSagaStarters api [ quota ]
     let subs      = Fcqrs.projection api (Projection.single 0 updateReadModel)
     // (Projection.multi when you must control which notifications publish)
     // send a command and await the resulting event (read-your-writes):
     let! ev = documents.Send (Fcqrs.newCid()) (Fcqrs.aggregateId id) cmd (fun e -> ...)

Query

Saga

Scheduler

SchedulerController

SubscribeExtensions

Top-level C# extension methods for ISubscribe. These live at *namespace* level (not nested inside the FCQRS.CSharp module) so C# actually discovers them as extensions — consumers `using FCQRS;` and write `subs.SubscribeFor(cid, n)` / `subs.SubscribeForFirst(cid)`.

Type something to start searching.