Refactor collection builders for IContainer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Composing;
|
||||
|
||||
namespace Umbraco.Core
|
||||
@@ -45,6 +46,9 @@ namespace Umbraco.Core
|
||||
|
||||
// fixme - document all these
|
||||
|
||||
public static IEnumerable<Registration> GetRegistered<TService>(this IContainer container)
|
||||
=> container.GetRegistered(typeof(TService));
|
||||
|
||||
public static void Register<TService, TImplementing>(this IContainer container, Lifetime lifetime = Lifetime.Transient)
|
||||
=> container.Register(typeof(TService), typeof(TImplementing), lifetime);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user