using System; using System.Linq.Expressions; using LightInject; using Umbraco.Core.ObjectResolution; namespace Umbraco.Web.PublishedCache { //TODO: REmove this requirement, just use normal IoC and publicize IPublishedCaches /// /// Resolves the IPublishedCaches object. /// internal sealed class PublishedCachesResolver : ContainerSingleObjectResolver { /// /// Initializes the resolver to use IoC /// /// /// public PublishedCachesResolver(IServiceContainer container, Type implementationType) : base(container, implementationType) { } /// /// Initializes a new instance of the class with caches. /// /// The caches. /// The resolver is created by the WebBootManager and thus the constructor remains internal. internal PublishedCachesResolver(IPublishedCaches caches) : base(caches) { } /// /// Initializes the resolver to use IoC /// /// /// public PublishedCachesResolver(IServiceContainer container, Func implementationType) : base(container, implementationType) { } /// /// Sets the caches. /// /// The caches. /// For developers, at application startup. public void SetCaches(IPublishedCaches caches) { Value = caches; } /// /// Gets the caches. /// public IPublishedCaches Caches { get { return Value; } } } }