2012-08-10 13:38:02 +06:00
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-10 13:38:02 +06:00
|
|
|
/// <summary>
|
2012-08-14 12:03:34 +06:00
|
|
|
/// Can be used by developers at runtime to set their IContentStore at app startup
|
2012-08-10 13:38:02 +06:00
|
|
|
/// </summary>
|
2012-08-14 12:03:34 +06:00
|
|
|
/// <param name="contentStore"></param>
|
|
|
|
|
public void SetContentStore(IContentStore contentStore)
|
2012-08-10 13:38:02 +06:00
|
|
|
{
|
2012-08-14 12:03:34 +06:00
|
|
|
Value = contentStore;
|
|
|
|
|
}
|
2012-08-10 13:38:02 +06:00
|
|
|
|
2012-08-14 12:03:34 +06:00
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the IContentStore
|
|
|
|
|
/// </summary>
|
|
|
|
|
public IContentStore ContentStore
|
|
|
|
|
{
|
|
|
|
|
get { return Value; }
|
2012-08-10 13:38:02 +06:00
|
|
|
}
|
2012-08-14 12:03:34 +06:00
|
|
|
}
|
2012-08-10 13:38:02 +06:00
|
|
|
}
|