Resvolution - Prepare

This commit is contained in:
Stephan
2016-08-19 11:41:39 +02:00
parent efcd1d5483
commit 9608e9ca97
2 changed files with 39 additions and 0 deletions

View File

@@ -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>