Resvolution - Prepare
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LightInject;
|
||||
|
||||
namespace Umbraco.Core.DependencyInjection
|
||||
@@ -36,6 +37,24 @@ namespace Umbraco.Core.DependencyInjection
|
||||
return This;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Appends types to the collections.
|
||||
/// </summary>
|
||||
/// <param name="types">The types to append.</param>
|
||||
/// <returns>The builder.</returns>
|
||||
public TBuilder Append(IEnumerable<Type> types)
|
||||
{
|
||||
Configure(list =>
|
||||
{
|
||||
foreach (var type in types)
|
||||
{
|
||||
if (list.Contains(type)) list.Remove(type);
|
||||
list.Add(type);
|
||||
}
|
||||
});
|
||||
return This;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Appends a type after another type.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user