View Source
Class RegisterExtensions
Provides extension methods to the IRegister class.
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class RegisterExtensions
Methods
View Source
Register<TService>(IRegister, TService)
Registers a service with an implementing instance.
Declaration
public static void Register<TService>(this IRegister register, TService instance)
where TService : class
Parameters
Type |
Name |
Description |
IRegister |
register |
|
TService |
instance |
|
Type Parameters
Name |
Description |
TService |
|
View Source
Register<TService>(IRegister, Lifetime)
Registers a service as its own implementation.
Declaration
public static void Register<TService>(this IRegister register, Lifetime lifetime = Lifetime.Transient)
where TService : class
Parameters
Type Parameters
Name |
Description |
TService |
|
View Source
Register<TService, TImplementing>(IRegister, Lifetime)
Registers a service with an implementation type.
Declaration
public static void Register<TService, TImplementing>(this IRegister register, Lifetime lifetime = Lifetime.Transient)
Parameters
Type Parameters
Name |
Description |
TService |
|
TImplementing |
|
View Source
RegisterAuto<TServiceBase>(IRegister)
Registers a base type for auto-registration.
Declaration
public static void RegisterAuto<TServiceBase>(this IRegister register)
where TServiceBase : class
Parameters
Type Parameters
Name |
Description |
TServiceBase |
|
View Source
RegisterFor<TService, TImplementing, TTarget>(IRegister, Lifetime)
Registers a service with an implementation type, for a target.
Declaration
public static void RegisterFor<TService, TImplementing, TTarget>(this IRegister register, Lifetime lifetime = Lifetime.Transient)
where TService : class
Parameters
Type Parameters
Name |
Description |
TService |
|
TImplementing |
|
TTarget |
|