Class UmbracoBuilder
The default implementation of IUmbracoBuilder used to configure Umbraco services and dependencies.
Inheritance
Namespace: Umbraco.Cms.Core.DependencyInjection
Assembly: Umbraco.Core.dll
Syntax
public class UmbracoBuilder : IUmbracoBuilder
Constructors
View SourceUmbracoBuilder(IServiceCollection, IConfiguration, TypeLoader)
Initializes a new instance of the UmbracoBuilder class primarily for testing.
Declaration
public UmbracoBuilder(IServiceCollection services, IConfiguration config, TypeLoader typeLoader)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | |
| IConfiguration | config | |
| TypeLoader | typeLoader |
UmbracoBuilder(IServiceCollection, IConfiguration, TypeLoader, ILoggerFactory, IProfiler, AppCaches)
Initializes a new instance of the UmbracoBuilder class.
Declaration
public UmbracoBuilder(IServiceCollection services, IConfiguration config, TypeLoader typeLoader, ILoggerFactory loggerFactory, IProfiler profiler, AppCaches appCaches)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | |
| IConfiguration | config | |
| TypeLoader | typeLoader | |
| ILoggerFactory | loggerFactory | |
| IProfiler | profiler | |
| AppCaches | appCaches |
Properties
View SourceAppCaches
Gets the AppCaches containing the application caches.
Declaration
public AppCaches AppCaches { get; }
Property Value
| Type | Description |
|---|---|
| AppCaches |
BuilderLoggerFactory
A Logger factory created specifically for the IUmbracoBuilder. This is NOT the same instance that will be resolved from DI. Use only if required during configuration.
Declaration
public ILoggerFactory BuilderLoggerFactory { get; }
Property Value
| Type | Description |
|---|---|
| ILoggerFactory |
Config
Gets the Microsoft.Extensions.Configuration.IConfiguration containing the application configuration properties.
Declaration
public IConfiguration Config { get; }
Property Value
| Type | Description |
|---|---|
| IConfiguration |
Profiler
Gets the IProfiler used for performance profiling.
Declaration
public IProfiler Profiler { get; }
Property Value
| Type | Description |
|---|---|
| IProfiler |
Services
Gets the Microsoft.Extensions.DependencyInjection.IServiceCollection where services are configured.
Declaration
public IServiceCollection Services { get; }
Property Value
| Type | Description |
|---|---|
| IServiceCollection |
TypeLoader
Gets the TypeLoader used for type discovery and loading.
Declaration
public TypeLoader TypeLoader { get; }
Property Value
| Type | Description |
|---|---|
| TypeLoader |
Methods
View SourceBuild()
Builds the Umbraco services by registering all configured collection builders with the service collection.
Declaration
public void Build()
WithCollectionBuilder<TBuilder>()
Gets a collection builder (and registers the collection).
Declaration
public TBuilder WithCollectionBuilder<TBuilder>() where TBuilder : ICollectionBuilder
Returns
| Type | Description |
|---|---|
| TBuilder | The collection builder. |
Type Parameters
| Name | Description |
|---|---|
| TBuilder | The type of the collection builder. |