Files
Umbraco-CMS/src/Umbraco.Web/PublishedContentStoreResolver.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
896 B
C#

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