Core.Strings - new IUrlSegmentProvider

This commit is contained in:
Stephan
2013-02-18 08:31:00 -01:00
parent a0f662c114
commit a995c9557c
9 changed files with 176 additions and 37 deletions

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Core.Strings
{
/// <summary>
/// Resolves IUrlSegmentProvider objects.
/// </summary>
internal sealed class UrlSegmentProviderResolver : ManyObjectsResolverBase<UrlSegmentProviderResolver, IUrlSegmentProvider>
{
/// <summary>
/// Initializes a new instance of the <see cref="UrlSegmentProviderResolver"/> class with an initial list of provider types.
/// </summary>
/// <param name="providerTypes">The list of provider types.</param>
/// <remarks>The resolver is created by the <c>WebBootManager</c> and thus the constructor remains internal.</remarks>
internal UrlSegmentProviderResolver(IEnumerable<Type> providerTypes)
: base(providerTypes)
{ }
/// <summary>
/// Initializes a new instance of the <see cref="UrlSegmentProviderResolver"/> class with an initial list of provider types.
/// </summary>
/// <param name="providerTypes">The list of provider types.</param>
/// <remarks>The resolver is created by the <c>WebBootManager</c> and thus the constructor remains internal.</remarks>
internal UrlSegmentProviderResolver(params Type[] providerTypes)
: base(providerTypes)
{ }
/// <summary>
/// Gets the providers.
/// </summary>
public IEnumerable<IUrlSegmentProvider> Providers
{
get { return this.Values; }
}
}
}