Class MapperCollectionBuilder
Provides a builder for creating a collection of database mappers used in Umbraco persistence operations.
Inheritance
object
Namespace: Umbraco.Cms.Infrastructure.Persistence.Mappers
Assembly: Umbraco.Infrastructure.dll
Syntax
public class MapperCollectionBuilder : SetCollectionBuilderBase<MapperCollectionBuilder, MapperCollection, BaseMapper>, ICollectionBuilder<MapperCollection, BaseMapper>, ICollectionBuilder
Constructors
View SourceMapperCollectionBuilder()
Declaration
public MapperCollectionBuilder()
Properties
View SourceThis
Gets the current builder instance.
Declaration
protected override MapperCollectionBuilder This { get; }
Property Value
| Type | Description |
|---|---|
| MapperCollectionBuilder |
Methods
View SourceAddCoreMappers()
Registers the predefined set of core mappers with the collection.
Declaration
public MapperCollectionBuilder AddCoreMappers()
Returns
| Type | Description |
|---|---|
| MapperCollectionBuilder | The current MapperCollectionBuilder instance, enabling method chaining. |
RegisterWith(IServiceCollection)
Registers the mapper collection and related services with the specified Microsoft.Extensions.DependencyInjection.IServiceCollection. This includes the MapperConfigurationStore, IMapperCollection, and ensures that the mapper collection is available for dependency injection.
Declaration
public override void RegisterWith(IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The service collection to register the mapper-related services with. |