# Stratara — generated reference Generated from the published assemblies and their XML documentation. Do not edit by hand; a build regenerates it and fails on a difference. The guides live in `docs/`, the guarantees in the capability specifications — this file is the lookup table underneath both. ## Configuration Every bindable options type, the section it binds from, and the default each key carries. ### `BusEnvelopeIntegrity` — Stratara.Abstractions.Messaging.BusEnvelopeIntegrityOptions | Key | Type | Default | |---|---|---| | `BusEnvelopeIntegrity:Mode` | `BusEnvelopeIntegrityMode` | `Off` | | `BusEnvelopeIntegrity:SharedKey` | `Byte[]` | — | ### `BusEnvelopeJson` — Stratara.Abstractions.Messaging.BusEnvelopeJsonOptions | Key | Type | Default | |---|---|---| | `BusEnvelopeJson:MaxBodyBytes` | `Int32` | `1048576` | | `BusEnvelopeJson:MaxDepth` | `Int32` | `32` | ### `MessageRetry` — Stratara.Abstractions.Messaging.MessageRetryOptions | Key | Type | Default | |---|---|---| | `MessageRetry:MaxConflictRequeues` | `Int32` | `100` | | `MessageRetry:MaxDeliveryAttempts` | `Int32` | `3` | ### `SessionContext` — Stratara.Abstractions.Session.SessionContextOptions | Key | Type | Default | |---|---|---| | `SessionContext:AllowTenantHeader` | `Boolean` | `false` | ### `ProjectionReplay:Restore` — Stratara.EventSourcing.EntityFrameworkCore.ReadStore.Replay.ReadModelRestoreOptions | Key | Type | Default | |---|---|---| | `ProjectionReplay:Restore:AdditionalTables` | `IList` | *(empty)* | | `ProjectionReplay:Restore:CommandTimeout` | `TimeSpan` | `00:30:00` | | `ProjectionReplay:Restore:ExcludedTables` | `IList` | *(empty)* | | `ProjectionReplay:Restore:Schema` | `String` | `stratara_replay` | ### `Outbox` — Stratara.Outbox.RabbitMQ.Outbox.OutboxOptions | Key | Type | Default | |---|---|---| | `Outbox:BatchSize` | `Int32` | `10000` | | `Outbox:DurableBundles` | `Boolean` | `false` | | `Outbox:LockLeaseSeconds` | `Int32` | `60` | | `Outbox:PollingIntervalSeconds` | `Int32` | `30` | ### `ProjectionReplay` — Stratara.Outbox.RabbitMQ.Projections.ProjectionReplayOptions | Key | Type | Default | |---|---|---| | `ProjectionReplay:LeaseSeconds` | `Int32` | `300` | | `ProjectionReplay:RefreshSeconds` | `Int32` | `5` | ### `Projections` — Stratara.Projections.Services.ProjectionOptions | Key | Type | Default | |---|---|---| | `Projections:BatchSize` | `Int32` | `5000` | | `Projections:DegreeOfParallelism` | `Int32?` | — | | `Projections:IdleDelaySeconds` | `Int32` | `5` | ### `Sagas` — Stratara.Sagas.Services.SagaOptions | Key | Type | Default | |---|---|---| | `Sagas:DegreeOfParallelism` | `Int32?` | — | ### `Stratara:BlobEncryption` — Stratara.Security.StrataraBlobEncryptionOptions | Key | Type | Default | |---|---|---| | `Stratara:BlobEncryption:LegacyBlobsCarryPurpose` | `Boolean` | `false` | ### `Stratara:KeyStore` — Stratara.Security.StrataraFileKeyStoreOptions | Key | Type | Default | |---|---|---| | `Stratara:KeyStore:MasterKeyBase64` | `String` | — | | `Stratara:KeyStore:StorePath` | `String` | `keystore.json` | ### `EventSourcing` — Stratara.Shared.EventSourcing.EventSourcingOptions | Key | Type | Default | |---|---|---| | `EventSourcing:AppendAgainstAggregatedVersion` | `Boolean` | `false` | | `EventSourcing:NewStreamOwnerFromSession` | `NewStreamOwnerPolicy` | `Allow` | ### `Messaging` — Stratara.Shared.Messaging.MessagingOptions | Key | Type | Default | |---|---|---| | `Messaging:PrefetchCount` | `Int32` | `16` | | `Messaging:Topics` | `TopicOptions[]` | *(empty)* | | `Messaging:UnconsumedSubscriptionWarningThreshold` | `Int32` | `10000` | ## Registrations Public extension methods a host calls to wire Stratara, with what each one does and needs. | Registration | Package | What it does | |---|---|---| | `AddAggregatesFromAssemblyContaining()` | Stratara.Abstractions | Scans the assembly containing T for concrete IAggregate implementations and registers each in the trusted-type resolver — together with every event type consumed by the aggregate's Apply(...) methods — so both SnapshotService can materialize the aggregate and IAggregationService can replay its event stream without further AddTrustedType() calls | | `AddApiKeyStore()` | Stratara.Identity.EntityFrameworkCore | Register the EF Core IApiKeyStore against TContext — issuance (raw key shown once, hash stored), idempotent import of a caller-supplied key for bootstrap scenarios, fail-closed validation, revocation, and per-tenant/per-user erasure sweeps | | `AddApiKeyStoreFromContextFactory()` | Stratara.Identity.EntityFrameworkCore | Register the EF Core IApiKeyStore against TContext, taking a fresh context for each operation from the registered context factory | | `AddAspNetIdentity()` | Stratara.Identity.AspNetCore | — | | `AddAspNetIdentityWithSignInManager()` | Stratara.Identity.AspNetCore | — | | `AddAuthorizingCommandOutboxDispatcher()` | Stratara.Infrastructure | Registers AuthorizingCommandOutboxDispatcher as the ICommandOutboxDispatcher (scoped), decorating whichever dispatcher was registered last — or CommandOutboxDispatcher when none was — and keeping CommandOutboxDispatcher available for direct resolution | | `AddAuthorizingMediator()` | Stratara.Mediator | Register TAuthorizationProvider as the IAuthorizationProvider implementation and wire IMediator to dispatch through an authorizing decorator that enforces RequireRoleAttribute annotations on the request type before delegating to the inner mediator | | `AddAzureServiceBus(String connectionString)` | Stratara.Outbox.AzureServiceBus | Registers the Stratara Azure Service Bus message bus using a SAS-token connection string | | `AddAzureServiceBusWithManagedIdentity(String fullyQualifiedNamespace, TokenCredential credential)` | Stratara.Outbox.AzureServiceBus | Registers the Stratara Azure Service Bus message bus using Azure-AD authentication (Managed Identity by default, or a caller-supplied TokenCredential) | | `AddBackendServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the API-host stack: common framework services (messaging, identity, session, security, mapping, resilience) + mediator + write store + outbox dispatcher | | `AddBackgroundTasks()` | Stratara.Infrastructure | Registers QueuedHostedService and a singleton IBackgroundTaskQueue with a default capacity of 100 pending items | | `AddBusEnvelopeIntegrity(Action configure)` | Stratara.Infrastructure | Opt in to HMAC integrity protection on every bus envelope | | `AddBusEnvelopeIntegrity(IConfiguration configuration)` | Stratara.Infrastructure | Opt in to HMAC integrity protection on every bus envelope | | `AddBusEnvelopeIntegrity(String base64SharedKey, BusEnvelopeIntegrityMode mode)` | Stratara.Infrastructure | Opt in to HMAC integrity protection on every bus envelope | | `AddCaching()` | Stratara.Infrastructure | Registers a singleton IConnectionMultiplexer built from the ConnectionStrings:redis configuration entry | | `AddCatalogPermissionResolver()` | Stratara.Identity.EntityFrameworkCore | Register CatalogPermissionResolver as the IPermissionResolver — permissions derive from tenant-scoped membership roles mapped through the catalog's role grants | | `AddCatalogPermissionResolver()` | Stratara.Identity.EntityFrameworkCore | Register CatalogPermissionResolver as the IPermissionResolver — permissions derive from tenant-scoped membership roles mapped through the catalog's role grants | | `AddCommandAuditing()` | Stratara.EventSourcing.Pipeline.CommandAudit | Registers the CommandAuditBehavior pipeline behaviors for both IRequest (void commands) and IRequest`1 (commands with a result) | | `AddCommandHandlersFromAssemblyContaining()` | Stratara.Mediator | Scan the assembly containing T and register every concrete ICommandHandler`1 implementation as a scoped service | | `AddCommandServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the command-handling stack without the bus-fed mediator worker: common framework services + mediator + write store + event sourcing + outbox dispatcher | | `AddCommandWorkerServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the command-worker stack: AddCommandServices + mediator-worker (hosted service that consumes the command topic into the in-process mediator) | | `AddCommonFrameworkServices()` | Stratara.EventSourcing.WorkerDefaults | Wires the cross-cutting Stratara framework services that every worker host depends on — messaging, identity, session context, security, event-mapping, and resilience pipelines | | `AddDefaultHealthChecks()` | Stratara.ServiceDefaults.AspNetCore | Registers a baseline health check (`self`) that always returns Healthy and is tagged live, so it shows up on both the /health and /alive endpoints once mapped via MapDefaultEndpoints | | `AddDevelopmentNoOpEmailSender()` | Stratara.Identity.AspNetCore | — | | `AddDomainEventTypesFromAssemblyContaining()` | Stratara.Abstractions | Scans the assembly containing T and registers only the event types consumed by the aggregates' Apply(TEvent) methods — without registering the aggregate types themselves and without registering any projection / saga / command-handler classes into DI | | `AddEventProjectionServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the event-projection stack without the bus-fed projection worker: common framework services + write store + projection replay state + the projection runtime and the replay worker, so a full replay still runs | | `AddEventProjectionWorkerServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the event-projection-worker stack: common framework services + write store + projection replay state + projection worker (hosted service) | | `AddEventSourcing()` | Stratara.Infrastructure | Registers the core event-sourcing services as scoped: IEventSource, IAggregationService, IChangeSetHandler, IEventTypeResolver, and ISnapshotService | | `AddEventStoreHealthCheck(String name, HealthStatus? failureStatus, IEnumerable tags)` | Stratara.EventSourcing.EntityFrameworkCore | Registers the EventStoreHealthCheck, verifying that the event-store (write-side) database is reachable | | `AddEventStreamHashWorker()` | Stratara.Infrastructure | Registers EventStreamHashWorker as a hosted service and the supporting IEventStreamHashService / IEventChainService implementations | | `AddEventStreamHashWorkerServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the event-stream-hash-worker stack: common framework services + write store + event-stream-hashing worker | | `AddEventUpcaster()` | Stratara.Abstractions | Registers TUpcaster as an IEventUpcaster and ensures the default IEventUpcasterPipeline is present | | `AddEventUpcaster(IEventUpcaster upcaster)` | Stratara.Abstractions | Registers TUpcaster as an IEventUpcaster and ensures the default IEventUpcasterPipeline is present | | `AddEventUpcasterPipeline()` | Stratara.Abstractions | Registers the default IEventUpcasterPipeline if no implementation has been registered yet | | `AddHeavyCommandWorker(Int32? degreeOfParallelism)` | Stratara.Outbox.RabbitMQ | Registers a dedicated heavy-command MediatorCommandWorker lane as a hosted service | | `AddHeavyCommandWorkerServices(Int32? degreeOfParallelism)` | Stratara.EventSourcing.WorkerDefaults | Registers the heavy-command-worker stack: the same full command-handling stack as AddCommandWorkerServices but with a dedicated heavy-command lane instead of the interactive one | | `AddIdentity()` | Stratara.Infrastructure | Registers the scoped ITenantService and ICurrentUserService implementations that resolve their values from the ambient ISessionContextProvider | | `AddMapping()` | Stratara.Shared | Registers the singleton IEventMapperFactory implementation used by the event-sourcing stack to materialize typed IEvent instances from persisted EventStreamEntry / EventMessage rows | | `AddMediator()` | Stratara.Mediator | Register IMediator as a scoped service | | `AddMediatorWorker()` | Stratara.Outbox.RabbitMQ | Registers the interactive MediatorCommandWorker as a hosted service | | `AddMembershipAuthorization()` | Stratara.Identity.EntityFrameworkCore | Register MembershipAuthorizationProvider as the IAuthorizationProvider — role checks pass on tenant-scoped membership roles only | | `AddMembershipAuthorization()` | Stratara.Identity.EntityFrameworkCore | Register MembershipAuthorizationProvider as the IAuthorizationProvider — role checks pass on tenant-scoped membership roles only | | `AddMembershipAuthorization(Action configure)` | Stratara.Identity.EntityFrameworkCore | Register MembershipAuthorizationProvider as the IAuthorizationProvider — role checks pass on tenant-scoped membership roles only | | `AddMembershipAuthorization(Action configure)` | Stratara.Identity.EntityFrameworkCore | Register MembershipAuthorizationProvider as the IAuthorizationProvider — role checks pass on tenant-scoped membership roles only | | `AddMembershipAuthorizationOptions(Action configure)` | Stratara.Identity.EntityFrameworkCore | Register the membership authorization options alone — for a host that passes the provider to AddAuthorizingMediator() rather than registering it here | | `AddMembershipCrossTenantAuthorizer(Action configure)` | Stratara.Identity.EntityFrameworkCore | Register MembershipCrossTenantAuthorizer as the ICrossTenantAuthorizer consulted by strict tenant isolation: cross-tenant operations are allowed for actors with an active membership in the data-owner tenant or with one of the configured cross-tenant roles | | `AddMembershipTenantClaim()` | Stratara.Identity.AspNetCore | Decorate the registered IUserClaimsPrincipalFactory`1 with MembershipClaimsPrincipalFactory`1, stamping the tenant claim into every issued principal (cookies and ASP.NET Identity bearer tokens) | | `AddMembershipTenantClaimsTransformation()` | Stratara.Identity.AspNetCore | Register MembershipClaimsTransformation as an IClaimsTransformation, resolving the tenant claim from the membership store on every request | | `AddMessaging()` | Stratara.Outbox.RabbitMQ | Registers the messaging infrastructure: IMessageBus backed by RabbitMqBus, the IMessagingIdentifier service, and binds MessagingOptions from the Messaging configuration section, BusEnvelopeJsonOptions from BusEnvelopeJson and MessageRetryOptions from MessageRetry, the retry bounds and the prefetch bound validated at start-up so that a bound of zero is refused before a message is consumed | | `AddNpgsqlIdentityDbContextFactory()` | Stratara.EventSourcing.EntityFrameworkCore | Registers an Npgsql-backed IDbContextFactory`1 for an identity-store DbContext together with a scoped resolution of the context itself (so ASP.NET Identity can inject it directly) and the default IDbResolver | | `AddNpgsqlReadDbContextFactory()` | Stratara.EventSourcing.EntityFrameworkCore | Registers an Npgsql-backed IDbContextFactory`1 for a read-store DbContext together with the read-side unit of work over it, and the default IDbResolver if none has been registered yet | | `AddNpgsqlWriteDbContextFactory()` | Stratara.EventSourcing.EntityFrameworkCore | Registers an Npgsql-backed IDbContextFactory`1 for a write-store DbContext together with the write-side unit of work over it, and the default IDbResolver if none has been registered yet | | `AddOutboxDispatcher()` | Stratara.Outbox.RabbitMQ | Registers ICommandOutboxDispatcher and IEventBundleOutboxDispatcher (scoped) and, transitively, IProjectionReplayState (singleton via AddProjectionReplayState) | | `AddOutboxHealthCheck(Int32? degradedThreshold, Int32? unhealthyThreshold, String name, HealthStatus? failureStatus, IEnumerable tags)` | Stratara.EventSourcing.EntityFrameworkCore | Registers the OutboxBacklogHealthCheck, reporting the depth and age of the Stratara outbox backlog | | `AddOutboxWorker(IConfiguration configuration)` | Stratara.Outbox.RabbitMQ | Registers the OutboxWorker hosted service and binds OutboxOptions from configuration | | `AddOutboxWorkerServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the outbox-worker stack: common framework services + write store + outbox dispatcher + outbox-retry worker | | `AddPermissionCatalog(Action configure)` | Stratara.Identity.EntityFrameworkCore | Build and register the application's PermissionCatalog (singleton) — the declared permission vocabulary plus its role→permission grants, consumed by the catalog permission resolvers and the HTTP permission policies | | `AddPipelineBehavior(Type openGenericBehaviorType)` | Stratara.Mediator | Register an open-generic IPipelineBehavior`1 implementation for void commands | | `AddPipelineBehaviorWithResult(Type openGenericBehaviorType)` | Stratara.Mediator | Register an open-generic IPipelineBehavior`2 implementation | | `AddProjectionHandling(IConfiguration configuration)` | Stratara.Projections | Registers the projection runtime without the worker that consumes the event-bundle subscription — ProjectionManager, ProjectionHandler, ProjectionMethodInvoker and the ProjectionReplayWorker, so a full replay still runs — and binds ProjectionOptions from the Projections section | | `AddProjectionReplayState()` | Stratara.Outbox.RabbitMQ | Registers the singleton IProjectionReplayState: Redis-backed where an IConnectionMultiplexer is registered, held in process otherwise | | `AddProjectionWorker(IConfiguration configuration)` | Stratara.Projections | Registers the projection runtime — ProjectionManager, ProjectionHandler, ProjectionMethodInvoker, ProjectionWorker, and ProjectionReplayWorker — and binds ProjectionOptions from configuration | | `AddProjectionsFromAssemblyContaining()` | Stratara.Projections | Scans the assembly containing T and registers every concrete IProjection implementation it finds as a scoped service | | `AddQueryHandlersFromAssemblyContaining()` | Stratara.Mediator | Scan the assembly containing T and register every concrete IQueryHandler`2 implementation as a scoped service | | `AddReadModelRestore(Action configure)` | Stratara.EventSourcing.EntityFrameworkCore | Keeps the read models a replay is about to empty, so a replay that fails — or whose host stops — leaves the read store as it was before the replay began, instead of empty or half rebuilt | | `AddRedisOutboxLock()` | Stratara.Outbox.RabbitMQ | Replaces the default NullOutboxLock with the Redis-backed RedisOutboxLock, enabling safe multi-instance outbox-worker deployments | | `AddResiliencePipelines()` | Stratara.Resilience | Register every Stratara named resilience pipeline (MessageBus, CommandDispatcher, EventBundleDispatcher, ConcurrencyConflict, PrecedingFact, ProjectionReplayBatch) with the application's Polly registry | | `AddSagaHandling(IConfiguration configuration)` | Stratara.Sagas | Registers the saga runtime services (ISagaManager, ISagaHandler, ISagaMethodInvoker) without the hosted SagaWorker, and binds SagaOptions from the Sagas configuration section | | `AddSagaServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the saga stack without the bus-fed saga worker: common framework services + write store + event sourcing + outbox dispatcher + the saga runtime | | `AddSagaWorker(IConfiguration configuration)` | Stratara.Sagas | Registers the saga runtime services (ISagaManager, ISagaHandler, ISagaMethodInvoker) and the hosted SagaWorker; binds SagaOptions from the Sagas configuration section | | `AddSagaWorkerServices()` | Stratara.EventSourcing.WorkerDefaults | Registers the saga-worker stack: common framework services + write store + event sourcing + outbox dispatcher + saga worker (hosted service that reacts to event bundles) | | `AddSagasFromAssemblyContaining()` | Stratara.Sagas | Scans the assembly that contains T for concrete ISaga implementations and registers each as a scoped ISaga | | `AddSecurity()` | Stratara.Infrastructure | Registers Stratara's security stack: ISecureJsonSerializer, the AES-GCM blob encryptor and IEncryptionFactory (delegated to Stratara.Security), and a development-onlyIKeyStore fallback (DummyKeyStore) | | `AddSessionContext()` | Stratara.Sessions | Register the concrete ISessionContextProvider implementation as a scoped service and register SessionContextOptions, read from the SessionContext configuration section | | `AddSettingCatalog(Action configure)` | Stratara.Identity.EntityFrameworkCore | Build and register the application's SettingCatalog (singleton) — the declared setting vocabulary with defaults and flags, consumed by the setting provider and the encrypting store decorator | | `AddSettingStore()` | Stratara.Identity.EntityFrameworkCore | Register the EF Core ISettingStore against TContext, plus the scope-fallback ISettingProvider read facade | | `AddSettingStoreFromContextFactory()` | Stratara.Identity.EntityFrameworkCore | Register the EF Core ISettingStore against TContext and the scope-fallback ISettingProvider read facade, taking a fresh context for each operation from the registered context factory | | `AddStrataraAggregateGrains()` | Stratara.Orleans | Forwards every command that names an aggregate into that aggregate's grain, where the command's handler runs in the grain's turn | | `AddStrataraApiKey(Action configure)` | Stratara.Identity.AspNetCore | Register the Stratara API-key authentication scheme (SchemeName) | | `AddStrataraAuthSchemeSelector(Action configure)` | Stratara.Identity.AspNetCore | Register the Stratara auth-scheme selector (SchemeName): a policy scheme that routes each request by shape — API-key header → API-key scheme, Authorization: Bearer → bearer scheme, everything else → the fallback (cookie) scheme | | `AddStrataraBlobEncryption()` | Stratara.Security | Register the AES-GCM blob encryptor and encryption factory | | `AddStrataraDurableTimers(Action configure)` | Stratara.Orleans | Registers IDurableTimers over the silo's reminder service | | `AddStrataraErasure()` | Stratara.Infrastructure | Registers ISubjectEraser, which composes the membership, API-key, setting and key-material sweeps into one operation | | `AddStrataraExecutionModelReset(String runtimeConnectionString, Func> clearDirectory, String schema)` | Stratara.Orleans.EntityFrameworkCore | Registers IExecutionModelReset for a deployment whose runtime keeps its reminders and membership in PostgreSQL and whose checkpoints live in TReadContext | | `AddStrataraExternalLoginProvisioning(Action configure)` | Stratara.Identity.AspNetCore | Register ExternalLoginProvisioningService`1 and its options | | `AddStrataraFileKeyStore(IConfiguration configuration)` | Stratara.Security | Register the production file-backed key store: a FileMasterKeyProvider (KEK custody), the EnvelopeFileKeyStore as IKeyStore, the AES-GCM blob encryptor, and a startup probe that validates the KEK eagerly | | `AddStrataraForgottenTenants()` | Stratara.EventSourcing.EntityFrameworkCore | Keeps the tenants that projections declaring IForgetsDeletedTenants have seen deleted in TReadContext | | `AddStrataraIntentStore()` | Stratara.Orleans.EntityFrameworkCore | Keeps the commands the Orleans execution model records, and the bookkeeping of their bounded resume, in the outbox table of TWriteContext | | `AddStrataraJwtBearer(IConfiguration configuration, String sectionName, String scheme)` | Stratara.Identity.AspNetCore | Register the API JWT-bearer validation scheme from configuration (default section Identity:JwtBearer) | | `AddStrataraOpenIdConnect(IConfiguration configuration, String sectionName, String scheme)` | Stratara.Identity.AspNetCore | Register the interactive OpenID Connect sign-in scheme from configuration (default section Identity:OpenIdConnect) | | `AddStrataraOrleansCommandDispatcher(Action configure)` | Stratara.Orleans | Replaces the bus-backed ICommandOutboxDispatcher with the durable-intent one: commands are recorded before the dispatch returns and handed to their grain, and the outbox drain resumes any hand-off that was lost, up to the MaxDeliveryAttempts the host configures for bus messages, after which the command is kept for an operator | | `AddStrataraPermissionPolicies()` | Stratara.Identity.AspNetCore | Register the permission policy provider and handler: every permission declared in the registered PermissionCatalog becomes an on-demand authorization policy — [Authorize("sims.read")] / .RequireAuthorization("sims.read") — evaluated through the registered IPermissionResolver | | `AddStrataraPortableCounterReader()` | Stratara.Orleans.EntityFrameworkCore | Reads the event store in commit order through the per-partition counter, on any relational provider | | `AddStrataraProblemDetails()` | Stratara.ServiceDefaults.AspNetCore | Registers StrataraProblemDetailsExceptionHandler and the ASP.NET problem-details service, so a validation rejection becomes 400 with the failures grouped by field, and an authorization refusal or tenant-access denial becomes 403 — all in one shape | | `AddStrataraProjectionCheckpoints()` | Stratara.Orleans.EntityFrameworkCore | Keeps the checkpoints of the store-reading projections and sagas in TReadContext | | `AddStrataraProjectionGrains(Action configure, Boolean hybrid)` | Stratara.Orleans | Runs every registered projection in grains that read the store in commit order from a checkpoint, and turns the bundle dispatcher into the wake-up hint | | `AddStrataraResilienceBehavior()` | Stratara.Resilience | Register the resilience pipeline behavior so any mediator request implementing IResilientRequest is dispatched inside the named Polly pipeline it selects | | `AddStrataraSagaGrains(Action configure, Boolean hybrid)` | Stratara.Orleans | Runs every registered saga in a grain per partition that reads the store in commit order from a checkpoint | | `AddStrataraSingletonWork(Action configure)` | Stratara.Orleans | Registers TWork to run once per cluster on its period | | `AddStrataraSingletonWork(String name, Action configure)` | Stratara.Orleans | Registers TWork to run once per cluster on its period | | `AddStrataraTenantIsolation(Action configure)` | Stratara.Mediator | Register the tenant-isolation pipeline behaviors for both request shapes (IRequest and IRequest`1) | | `AddStrataraTestingEventStore(SqliteConnection sharedConnection, Guid defaultTenantId)` | Stratara.Testing.EntityFrameworkCore | Register the event-sourcing write stack (IEventSource, IAggregationService, snapshots, the EF Core write store) over sharedConnection, plus an InMemoryKeyStore, a TestSessionContextProvider, and a RecordingEventBundleOutboxDispatcher | | `AddStrataraTestingEventStore(String connectionString, Guid defaultTenantId, Action configureContext)` | Stratara.Testing.EntityFrameworkCore | Register the event-sourcing write stack (IEventSource, IAggregationService, snapshots, the EF Core write store) over sharedConnection, plus an InMemoryKeyStore, a TestSessionContextProvider, and a RecordingEventBundleOutboxDispatcher | | `AddStrataraValidation()` | Stratara.Validation | Register the validation pipeline behaviors for both request shapes (IRequest and IRequest`1) | | `AddTenantMembershipStore()` | Stratara.Identity.EntityFrameworkCore | Register the EF Core ITenantMembershipStore against TContext | | `AddTenantMembershipStoreFromContextFactory()` | Stratara.Identity.EntityFrameworkCore | Register the EF Core ITenantMembershipStore against TContext, taking a fresh context for each operation from the registered context factory | | `AddTrustedType()` | Stratara.Abstractions | Registers T in the trusted-type allowlist | | `AddTrustedTypeResolver()` | Stratara.Abstractions | Registers the ITrustedTypeResolver as a singleton if no implementation has been registered yet | | `AddValidatorsFromAssemblyContaining()` | Stratara.Validation | Scan the assembly containing T and register every concrete IValidator`1 implementation as a scoped service against each closed IValidator`1 interface it implements | | `AddWriteStore(IConfiguration configuration)` | Stratara.EventSourcing.EntityFrameworkCore | Binds EventSourcingOptions from the EventSourcing configuration section, the section for write-side settings | | `ConfigureAspNetOpenTelemetry()` | Stratara.ServiceDefaults.AspNetCore | Wires ASP.NET Core request instrumentation on metrics + tracing on top of the base pipeline configured by ConfigureOpenTelemetry | | `ConfigureOpenTelemetry(Action configureMetrics, Action configureTracing)` | Stratara.ServiceDefaults | Configures OpenTelemetry logging + metrics + tracing on the given host builder | | `ConfigureSerilog()` | Stratara.ServiceDefaults | Registers Serilog as the host's logging provider with Stratara defaults (destructuring attributes, async console sink, OTLP sink when configured) | | `ConfigureStrataraHeavyWork(Action configure)` | Stratara.Orleans | Settings for heavy work: the cluster-wide limit, the permit retry and the permit lease | | `MapDefaultEndpoints(Boolean requireAuthorizationOnHealth)` | Stratara.ServiceDefaults.AspNetCore | Maps the standard health endpoints: /health (full report) and /alive (only checks tagged live) | ## Exceptions What the framework throws. Catching one of these is a contract; catching `Exception` is not. | Exception | Package | Thrown when | |---|---|---| | `Stratara.Abstractions.Authorization.AuthorizationException` | Stratara.Abstractions | Thrown by the authorizing mediator/dispatcher decorators when the caller does not hold a role required by RequireRoleAttribute on the dispatched request type | | `Stratara.Abstractions.Authorization.PermissionAuthorizationException` | Stratara.Abstractions | Thrown by the authorizing mediator/dispatcher decorators when the caller does not hold a permission required by RequirePermissionAttribute on the dispatched request type | | `Stratara.Abstractions.Erasure.ErasureIncompleteException` | Stratara.Abstractions | Raised when one plane's sweep fails during a composed erasure | | `Stratara.Abstractions.EventSourcing.CommittedEventsNotPublishedException` | Stratara.Abstractions | Thrown by SaveChangesAsync when the save committed its events but handing their bundle on failed afterwards | | `Stratara.Abstractions.EventSourcing.ConcurrencyException` | Stratara.Abstractions | Thrown by SaveChangesAsync when another writer committed to the same stream first and the optimistic version check fails | | `Stratara.Abstractions.EventSourcing.PrecedingFactMissingException` | Stratara.Abstractions | Reports that the entity a fact refers to does not exist in the handler's read model yet, so the fact cannot be applied until the fact that created the entity has been | | `Stratara.Abstractions.Multitenancy.TenantAccessDeniedException` | Stratara.Abstractions | Thrown by the tenant-isolation pipeline behavior when an ITenantScopedRequest is rejected: either its TenantId does not match the current session's data-owner tenant, or strict mode observed an unauthorized cross-tenant operation | | `Stratara.Abstractions.Persistence.ConcurrencyConflictException` | Stratara.Abstractions | Thrown by an ITransaction implementation when an optimistic-concurrency conflict is detected during commit (i.e | | `Stratara.Abstractions.Session.SessionRequiredException` | Stratara.Abstractions | Thrown when an operation that must be attributed to a caller — saving events, recording a command audit, dispatching a command — runs with no session context set | | `Stratara.Abstractions.Validation.StrataraValidationException` | Stratara.Abstractions | Thrown by the validation pipeline behavior when a request fails validation with one or more Error-severity failures | ## Names on the wire Identifiers Stratara uses outside its own process — what an operator provisions and what a cache holds. Topic and subscription names are the fallbacks used when `Messaging:Topics` configures nothing. | Name | Kind | Declared by | |---|---|---| | `command` | topic | MessagingIdentifier | | `command-subscription` | subscription | MessagingIdentifier | | `event-bundle` | topic | MessagingIdentifier | | `event-bundle-saga-subscription` | subscription | MessagingIdentifier | | `event-bundle-subscription` | subscription | MessagingIdentifier | | `heavy-command` | topic | MessagingIdentifier | | `heavy-command-subscription` | subscription | MessagingIdentifier | | `notifications` | topic | MessagingIdentifier | | `stratara:outbox:lock` | cache key | RedisOutboxLock | | `stratara:projection:replay:active` | cache key | ProjectionReplayState | | `stratara:projection:replay:claimed:` | cache key | ProjectionReplayState | | `stratara:projection:replay:error` | cache key | ProjectionReplayState | | `stratara:projection:replay:last` | cache key | ProjectionReplayState | | `stratara:projection:replay:processed` | cache key | ProjectionReplayState | | `stratara:projection:replay:request` | cache key | ProjectionReplayState | | `stratara:projection:replay:request-id` | cache key | ProjectionReplayState | | `stratara:projection:replay:state` | cache key | ProjectionReplayState | | `stratara:projection:replay:total` | cache key | ProjectionReplayState | | `stratara:setting:` | cache key | EncryptingSettingStore | | `stratara:tenant_id` | claim type | StrataraClaimTypes |