Remove obsolete PublishedContentQuery constructor

This commit is contained in:
Benjamin Carleski
2020-01-20 11:45:44 -08:00
parent f463fae047
commit cd4f646ed0
4 changed files with 10 additions and 10 deletions

View File

@@ -22,12 +22,6 @@ namespace Umbraco.Web
private readonly IVariationContextAccessor _variationContextAccessor;
private readonly IExamineManager _examineManager;
[Obsolete("Use the constructor with all parameters instead")]
public PublishedContentQuery(IPublishedSnapshot publishedSnapshot, IVariationContextAccessor variationContextAccessor)
: this (publishedSnapshot, variationContextAccessor, ExamineManager.Instance)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="PublishedContentQuery"/> class.
/// </summary>

View File

@@ -1,3 +1,4 @@
using Examine;
using System.Globalization;
using System.Linq;
using Umbraco.Core;
@@ -16,12 +17,14 @@ namespace Umbraco.Web.Routing
private readonly ILogger _logger;
private readonly IEntityService _entityService;
private readonly IContentSection _contentConfigSection;
private readonly IExamineManager _examineManager;
public ContentFinderByConfigured404(ILogger logger, IEntityService entityService, IContentSection contentConfigSection)
public ContentFinderByConfigured404(ILogger logger, IEntityService entityService, IContentSection contentConfigSection, IExamineManager examineManager)
{
_logger = logger;
_entityService = entityService;
_contentConfigSection = contentConfigSection;
_examineManager = examineManager;
}
/// <summary>
@@ -62,7 +65,7 @@ namespace Umbraco.Web.Routing
var error404 = NotFoundHandlerHelper.GetCurrentNotFoundPageId(
_contentConfigSection.Error404Collection.ToArray(),
_entityService,
new PublishedContentQuery(frequest.UmbracoContext.PublishedSnapshot, frequest.UmbracoContext.VariationContextAccessor),
new PublishedContentQuery(frequest.UmbracoContext.PublishedSnapshot, frequest.UmbracoContext.VariationContextAccessor, _examineManager),
errorCulture);
IPublishedContent content = null;

View File

@@ -106,7 +106,7 @@ namespace Umbraco.Web.Runtime
composition.Register<IPublishedContentQuery>(factory =>
{
var umbCtx = factory.GetInstance<IUmbracoContextAccessor>();
return new PublishedContentQuery(umbCtx.UmbracoContext.PublishedSnapshot, factory.GetInstance<IVariationContextAccessor>());
return new PublishedContentQuery(umbCtx.UmbracoContext.PublishedSnapshot, factory.GetInstance<IVariationContextAccessor>(), factory.GetInstance<IExamineManager>());
}, Lifetime.Request);
composition.Register<ITagQuery, TagQuery>(Lifetime.Request);