Configuration & Bootstrapping
RCommon uses a single fluent builder entry point. All configuration happens at application startup before the DI container is built.
The AddRCommon() extension method
AddRCommon() is an extension method on IServiceCollection defined in RCommon.Core. Calling it creates an RCommonBuilder, registers the core framework services, and returns an IRCommonBuilder for further configuration.
using RCommon;
// In Program.cs or a DI registration method
builder.Services.AddRCommon();
Calling AddRCommon() always registers these services regardless of what else is configured:
EventSubscriptionManager(singleton) — tracks event-to-producer subscriptionsIEventBusbacked byInMemoryEventBus(singleton) — in-process publish/subscribeIEventRouterbacked byInMemoryTransactionalEventRouter(scoped) — coordinates domain events with the unit of workCachingOptionsconfigured with caching disabled by default