Class UmbracoBuilderExtensions
Provides extension methods to the
Inheritance
Namespace: Umbraco.Cms.Infrastructure.DependencyInjection
Assembly: cs.temp.dll.dll
Syntax
public static class UmbracoBuilderExtensions
Methods
AddCoreInitialServices(IUmbracoBuilder)
Adds all core Umbraco services required to run which may be replaced later in the pipeline
Declaration
public static IUmbracoBuilder AddCoreInitialServices(this IUmbracoBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
AddCoreMappingProfiles(IUmbracoBuilder)
Registers the core Umbraco mapper definitions
Declaration
public static IUmbracoBuilder AddCoreMappingProfiles(this IUmbracoBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
AddCoreNotifications(IUmbracoBuilder)
Declaration
public static IUmbracoBuilder AddCoreNotifications(this IUmbracoBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
AddDistributedCache(IUmbracoBuilder)
Adds distributed cache support
Declaration
public static IUmbracoBuilder AddDistributedCache(this IUmbracoBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Remarks
This is still required for websites that are not load balancing because this ensures that sites hosted with managed hosts like IIS/etc... work correctly when AppDomains are running in parallel.
AddExamine(IUmbracoBuilder)
Declaration
public static IUmbracoBuilder AddExamine(this IUmbracoBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
AddLogViewer(IUmbracoBuilder)
Declaration
public static IUmbracoBuilder AddLogViewer(this IUmbracoBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
ConfigureFileSystems(IUmbracoBuilder, Action<IServiceProvider, FileSystems>)
Register FileSystems with a method to configure the
Declaration
public static IUmbracoBuilder ConfigureFileSystems(this IUmbracoBuilder builder, Action<IServiceProvider, FileSystems> configure)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | A builder. |
| System.Action<System.IServiceProvider, FileSystems> | configure | Method that configures the |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Throws exception if |
| System.InvalidOperationException | Throws exception if full path can't be resolved successfully. |
SetCultureDictionaryFactory(IUmbracoBuilder, ICultureDictionaryFactory)
Sets the culture dictionary factory.
Declaration
public static IUmbracoBuilder SetCultureDictionaryFactory(this IUmbracoBuilder builder, ICultureDictionaryFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| ICultureDictionaryFactory | factory | A factory. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetCultureDictionaryFactory(IUmbracoBuilder, Func<IServiceProvider, ICultureDictionaryFactory>)
Sets the culture dictionary factory.
Declaration
public static IUmbracoBuilder SetCultureDictionaryFactory(this IUmbracoBuilder builder, Func<IServiceProvider, ICultureDictionaryFactory> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| System.Func<System.IServiceProvider, ICultureDictionaryFactory> | factory | A function creating a culture dictionary factory. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetCultureDictionaryFactory<T>(IUmbracoBuilder)
Sets the culture dictionary factory.
Declaration
public static IUmbracoBuilder SetCultureDictionaryFactory<T>(this IUmbracoBuilder builder)
where T : class, ICultureDictionaryFactory
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the factory. |
SetDefaultViewContentProvider<T>(IUmbracoBuilder)
Sets the default view content provider
Declaration
public static IUmbracoBuilder SetDefaultViewContentProvider<T>(this IUmbracoBuilder builder)
where T : class, IDefaultViewContentProvider
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the provider. |
SetLogViewer(IUmbracoBuilder, ILogViewer)
Sets the log viewer.
Declaration
public static IUmbracoBuilder SetLogViewer(this IUmbracoBuilder builder, ILogViewer viewer)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | A builder. |
| ILogViewer | viewer | A log viewer. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetLogViewer(IUmbracoBuilder, Func<IServiceProvider, ILogViewer>)
Sets the log viewer.
Declaration
public static IUmbracoBuilder SetLogViewer(this IUmbracoBuilder builder, Func<IServiceProvider, ILogViewer> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| System.Func<System.IServiceProvider, ILogViewer> | factory | A function creating a log viewer. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetLogViewer<T>(IUmbracoBuilder)
Sets the log viewer.
Declaration
public static IUmbracoBuilder SetLogViewer<T>(this IUmbracoBuilder builder)
where T : class, ILogViewer
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the log viewer. |
SetMediaFileSystem(IUmbracoBuilder, Func<IServiceProvider, IFileSystem>)
Sets the filesystem used by the MediaFileManager
Declaration
public static IUmbracoBuilder SetMediaFileSystem(this IUmbracoBuilder builder, Func<IServiceProvider, IFileSystem> filesystemFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | A builder. |
| System.Func<System.IServiceProvider, IFileSystem> | filesystemFactory | Factory method to create an IFileSystem implementation used in the MediaFileManager |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetPublishedContentModelFactory(IUmbracoBuilder, IPublishedModelFactory)
Sets the published content model factory.
Declaration
public static IUmbracoBuilder SetPublishedContentModelFactory(this IUmbracoBuilder builder, IPublishedModelFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| IPublishedModelFactory | factory | A published content model factory. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetPublishedContentModelFactory(IUmbracoBuilder, Func<IServiceProvider, IPublishedModelFactory>)
Sets the published content model factory.
Declaration
public static IUmbracoBuilder SetPublishedContentModelFactory(this IUmbracoBuilder builder, Func<IServiceProvider, IPublishedModelFactory> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| System.Func<System.IServiceProvider, IPublishedModelFactory> | factory | A function creating a published content model factory. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetPublishedContentModelFactory<T>(IUmbracoBuilder)
Sets the published content model factory.
Declaration
public static IUmbracoBuilder SetPublishedContentModelFactory<T>(this IUmbracoBuilder builder)
where T : class, IPublishedModelFactory
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the factory. |
SetServerMessenger(IUmbracoBuilder, IServerMessenger)
Sets the server messenger.
Declaration
public static IUmbracoBuilder SetServerMessenger(this IUmbracoBuilder builder, IServerMessenger registrar)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| IServerMessenger | registrar | A server messenger. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetServerMessenger(IUmbracoBuilder, Func<IServiceProvider, IServerMessenger>)
Sets the server messenger.
Declaration
public static IUmbracoBuilder SetServerMessenger(this IUmbracoBuilder builder, Func<IServiceProvider, IServerMessenger> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| System.Func<System.IServiceProvider, IServerMessenger> | factory | A function creating a server messenger. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetServerMessenger<T>(IUmbracoBuilder)
Sets the server messenger.
Declaration
public static IUmbracoBuilder SetServerMessenger<T>(this IUmbracoBuilder builder)
where T : class, IServerMessenger
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the server registrar. |
SetServerRegistrar(IUmbracoBuilder, IServerRoleAccessor)
Sets the server registrar.
Declaration
public static IUmbracoBuilder SetServerRegistrar(this IUmbracoBuilder builder, IServerRoleAccessor registrar)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| IServerRoleAccessor | registrar | A server registrar. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetServerRegistrar(IUmbracoBuilder, Func<IServiceProvider, IServerRoleAccessor>)
Sets the server registrar.
Declaration
public static IUmbracoBuilder SetServerRegistrar(this IUmbracoBuilder builder, Func<IServiceProvider, IServerRoleAccessor> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| System.Func<System.IServiceProvider, IServerRoleAccessor> | factory | A function creating a server registrar. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetServerRegistrar<T>(IUmbracoBuilder)
Sets the server registrar.
Declaration
public static IUmbracoBuilder SetServerRegistrar<T>(this IUmbracoBuilder builder)
where T : class, IServerRoleAccessor
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the server registrar. |
SetShortStringHelper(IUmbracoBuilder, IShortStringHelper)
Sets the short string helper.
Declaration
public static IUmbracoBuilder SetShortStringHelper(this IUmbracoBuilder builder, IShortStringHelper helper)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | A builder. |
| IShortStringHelper | helper | A short string helper. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetShortStringHelper(IUmbracoBuilder, Func<IServiceProvider, IShortStringHelper>)
Sets the short string helper.
Declaration
public static IUmbracoBuilder SetShortStringHelper(this IUmbracoBuilder builder, Func<IServiceProvider, IShortStringHelper> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
| System.Func<System.IServiceProvider, IShortStringHelper> | factory | A function creating a short string helper. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
SetShortStringHelper<T>(IUmbracoBuilder)
Sets the short string helper.
Declaration
public static IUmbracoBuilder SetShortStringHelper<T>(this IUmbracoBuilder builder)
where T : class, IShortStringHelper
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IUmbracoBuilder |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the short string helper. |