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
861 B
C#
32 lines
861 B
C#
using Umbraco.Core.ObjectResolution;
|
|
|
|
namespace Umbraco.Web
|
|
{
|
|
/// <summary>
|
|
/// An object resolver to return the IPublishedMediaStore
|
|
/// </summary>
|
|
internal class PublishedMediaStoreResolver : SingleObjectResolverBase<PublishedMediaStoreResolver, IPublishedMediaStore>
|
|
{
|
|
internal PublishedMediaStoreResolver(IPublishedMediaStore publishedMediaStore)
|
|
: base(publishedMediaStore)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Can be used by developers at runtime to set their IContentStore at app startup
|
|
/// </summary>
|
|
/// <param name="publishedMediaStore"></param>
|
|
public void SetContentStore(IPublishedMediaStore publishedMediaStore)
|
|
{
|
|
Value = publishedMediaStore;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the IContentStore
|
|
/// </summary>
|
|
public IPublishedMediaStore PublishedMediaStore
|
|
{
|
|
get { return Value; }
|
|
}
|
|
}
|
|
} |