Web.Routing - refactor domains management

This commit is contained in:
Stephan
2013-02-19 06:37:25 -01:00
parent 7da60e9937
commit ac3bec5d9e
13 changed files with 967 additions and 185 deletions

View File

@@ -0,0 +1,38 @@
using System;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Web.Routing
{
/// <summary>
/// Resolves the <see cref="ISiteDomainHelper"/> implementation.
/// </summary>
internal sealed class SiteDomainHelperResolver : SingleObjectResolverBase<SiteDomainHelperResolver, ISiteDomainHelper>
{
/// <summary>
/// Initializes a new instance of the <see cref="SiteDomainHelperResolver"/> class with an <see cref="ISiteDomainHelper"/> implementation.
/// </summary>
/// <param name="helper">The <see cref="ISiteDomainHelper"/> implementation.</param>
internal SiteDomainHelperResolver(ISiteDomainHelper helper)
: base(helper)
{ }
/// <summary>
/// Can be used by developers at runtime to set their IDomainHelper at app startup
/// </summary>
/// <param name="helper"></param>
public void SetHelper(ISiteDomainHelper helper)
{
Value = helper;
}
/// <summary>
/// Gets or sets the <see cref="ISiteDomainHelper"/> implementation.
/// </summary>
public ISiteDomainHelper Helper
{
get { return Value; }
}
}
}