Files
Umbraco-CMS/src/Umbraco.Web/PublishedMediaStoreResolver.cs
Shannon Deminick 82c2560822 Ensures all resolvers are sealed. Changes CacheRefreshersResolver, DataTypesResolver, MacroFieldEditorsResolver, PackageActionsResolver, ActionsResolver
to all be lazy resolvers as they are not needed instantly on app startup (not needed by the front-end) This will
make app startup a lot quicker. Fixes ActionsResolver to not use the PluginManager to resolve the types when it
is instantiating them since these are passed in the ctor. Updates all unit tests to use lazy delegate for these resolvers
and they are all passing.
2013-01-23 18:40:40 +03:00

32 lines
868 B
C#

using Umbraco.Core.ObjectResolution;
namespace Umbraco.Web
{
/// <summary>
/// An object resolver to return the IPublishedMediaStore
/// </summary>
internal sealed 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; }
}
}
}