Files
Umbraco-CMS/src/Umbraco.Web/ContentStoreResolver.cs

32 lines
740 B
C#
Raw Normal View History

using Umbraco.Core.ObjectResolution;
namespace Umbraco.Web
{
2012-08-14 12:03:34 +06:00
/// <summary>
/// An object resolver to return the IContentStore
/// </summary>
internal class ContentStoreResolver : SingleObjectResolverBase<ContentStoreResolver, IContentStore>
{
internal ContentStoreResolver(IContentStore contentStore)
: base(contentStore)
{
}
/// <summary>
2012-08-14 12:03:34 +06:00
/// Can be used by developers at runtime to set their IContentStore at app startup
/// </summary>
2012-08-14 12:03:34 +06:00
/// <param name="contentStore"></param>
public void SetContentStore(IContentStore contentStore)
{
2012-08-14 12:03:34 +06:00
Value = contentStore;
}
2012-08-14 12:03:34 +06:00
/// <summary>
/// Returns the IContentStore
/// </summary>
public IContentStore ContentStore
{
get { return Value; }
}
2012-08-14 12:03:34 +06:00
}
}