the methods in UmbracoHelper so we only have to maintain one set of code. Didn't port over the Wrap methods because I need feedback on these as to what they do/are supposed to do. Added the Media methods to UmbracoHelper using the media store stuff.
32 lines
889 B
C#
32 lines
889 B
C#
using Umbraco.Core.ObjectResolution;
|
|
|
|
namespace Umbraco.Web
|
|
{
|
|
/// <summary>
|
|
/// An object resolver to return the IPublishedContentStore
|
|
/// </summary>
|
|
internal class PublishedContentStoreResolver : SingleObjectResolverBase<PublishedContentStoreResolver, IPublishedContentStore>
|
|
{
|
|
internal PublishedContentStoreResolver(IPublishedContentStore publishedContentStore)
|
|
: base(publishedContentStore)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Can be used by developers at runtime to set their IContentStore at app startup
|
|
/// </summary>
|
|
/// <param name="publishedContentStore"></param>
|
|
public void SetContentStore(IPublishedContentStore publishedContentStore)
|
|
{
|
|
Value = publishedContentStore;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the IContentStore
|
|
/// </summary>
|
|
public IPublishedContentStore PublishedContentStore
|
|
{
|
|
get { return Value; }
|
|
}
|
|
}
|
|
} |