Core builder infrastructure, options management, context and messaging abstractions, paging, background worker, and shared constants.
$ dotnet add package FluensCore builder infrastructure, options management, context and messaging abstractions, paging, background worker, and shared constants.
dotnet add package Fluens
Call AddFluens() to initialize the core builder infrastructure:
var fluensBuilder = builder.AddFluens();
This reads the Fluens:App configuration section and creates an IAppInfo singleton:
{
"Fluens": {
"App": {
"Name": "MyApp",
"Version": "1.0.0",
"Instance": "instance-01",
"PublicUri": "https://myapp.example.com",
"UniqueId": 1
}
}
}
Key types:
IFluensBuilder — Central interface for configuring Fluens.IFluensModuleBuilder — Module-scoped builder carrying assembly, name, and schema context.IAppInfo — Application identity (Name, Version, Instance, CachePrefix).IOptionsManager — Configuration binding with validation (ConfigureRequired, Configure, GetRequired, Get).ValidatableOptions — Base class for options that support self-validation at startup.BackgroundWorker — Base class combining periodic timer with channel-based wake-up. Supports graceful shutdown: OperationCanceledException caused by the stopping token is silently handled (not logged as error).IDataProvider — Marker interface for cross-module read-only data providers.ITypedIdentifier / ITypedIdentifier<out T> — Strongly-typed identifier abstractions.IContext / Context — Execution context carrying ActivityId, TraceId, CorrelationId, MessageId, CausationId, UserId.IContextProvider — Provides access to the current execution context.IModuleContextAccessor — Module execution context for CQRS boundary enforcement.IConsumedMessageContext — Context of a message being consumed from the inbox.MessagePriorities — Priority levels for inbox/outbox messages (Low, Normal, High).PagedResult<T> — Paged query result with Items, TotalPages, TotalItems, PageIndex.PagingDefaults — Static constants for pagination: DefaultPageIndex (1), DefaultPageSize (20), MinPageSize (1), MaxPageSize (100).Constants — Shared constants for CQRS query defaults and HTTP headers.TypeExtensions — GetModuleName() extension deriving module name from type namespace.ValueStopWatch — Zero-allocation, high-precision stopwatch struct.This project is licensed under the MIT License.