Register instance by name
This commit is contained in:
@@ -119,6 +119,11 @@ namespace Umbraco.Core.Composing
|
||||
/// </summary>
|
||||
void RegisterInstance(Type serviceType, object instance);
|
||||
|
||||
/// <summary>
|
||||
/// Registers a service with a named implementing instance.
|
||||
/// </summary>
|
||||
void RegisterInstance(Type serviceType, object instance, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Registers a base type for auto-registration.
|
||||
/// </summary>
|
||||
|
||||
@@ -285,6 +285,10 @@ namespace Umbraco.Core.Composing.LightInject
|
||||
public void RegisterInstance(Type serviceType, object instance)
|
||||
=> Container.RegisterInstance(serviceType, instance);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void RegisterInstance(Type serviceType, object instance, string name)
|
||||
=> Container.RegisterInstance(serviceType, instance, name);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void RegisterAuto(Type serviceBaseType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user