Interface IMaterializedViewsBuilder
- Namespace
- Excalibur.EventSourcing.DependencyInjection
- Assembly
- Excalibur.EventSourcing.dll
Fluent builder interface for configuring materialized view services.
public interface IMaterializedViewsBuilder
- Extension Methods
Examples
services.AddMaterializedViews(builder =>
{
builder.AddBuilder<OrderSummaryView, OrderSummaryViewBuilder>()
.AddBuilder<CustomerStatsView, CustomerStatsViewBuilder>()
.UseStore<SqlServerMaterializedViewStore>();
});
Remarks
This interface follows the Microsoft-style fluent builder pattern for registering materialized view builders, stores, and processors.
All methods return this for method chaining, enabling a fluent configuration experience.
Properties
Services
Gets the service collection being configured.
IServiceCollection Services { get; }
Property Value
Methods
AddBuilder<TView, TBuilder>()
Registers a materialized view builder.
IMaterializedViewsBuilder AddBuilder<TView, TBuilder>() where TView : class, new() where TBuilder : class, IMaterializedViewBuilder<TView>
Returns
- IMaterializedViewsBuilder
The builder for fluent configuration.
Type Parameters
TViewThe view type.
TBuilderThe builder implementation type.
UseProcessor<TProcessor>()
Configures the materialized view processor implementation.
IMaterializedViewsBuilder UseProcessor<TProcessor>() where TProcessor : class, IMaterializedViewProcessor
Returns
- IMaterializedViewsBuilder
The builder for fluent configuration.
Type Parameters
TProcessorThe processor implementation type.
UseStore(Func<IServiceProvider, IMaterializedViewStore>)
Configures the materialized view store with a factory function.
IMaterializedViewsBuilder UseStore(Func<IServiceProvider, IMaterializedViewStore> storeFactory)
Parameters
storeFactoryFunc<IServiceProvider, IMaterializedViewStore>Factory function to create the store.
Returns
- IMaterializedViewsBuilder
The builder for fluent configuration.
UseStore<TStore>()
Configures the materialized view store implementation.
IMaterializedViewsBuilder UseStore<TStore>() where TStore : class, IMaterializedViewStore
Returns
- IMaterializedViewsBuilder
The builder for fluent configuration.
Type Parameters
TStoreThe store implementation type.