V14: Deleted code marked as obsolete for V14 (#15998)
* Obsoletions related to Delivery API * Fix TypeLoader and TypeFinder tests * Remove obsolete and default implementations of IFileSource and IFileTypeCollection * More Delivery API related obsoletions * VariationContextAccessor related * ValueFactories obsoletion and fix references * ValueSetBuilders obsoletions * ValueConverters obsoletions * Other obsolete ctors and methods * Forgotten VariationContextAccessor obsoletion * More obsoletions * XPath related obsoletions * Revert XmlHelper changes * Delete RenamedRootNavigator and its tests * Fix test * XmlHelper obsoletion * Return null instead of GetXPathValue * Obsolete entire class instead * Remove XPath obsoletions from IPublishedCache * Remove XPath-related if-block that is no longer needed * Change obsolete msg for classes needed for NuCache * Moving classes to NuCache and making them internal * Remove more XPath-related obsoletions * Remove NavigableNavigator and its tests * Cleanup * Remove Xpath references from tests * Revert interface deletion in MediaCache * Using XOR operation Co-authored-by: Nuklon <Nuklon@users.noreply.github.com> --------- Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
187d45860a
commit
9c18cd22e0
@@ -1,12 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Xml.XPath;
|
||||
using Examine;
|
||||
using Examine.Search;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Models.PublishedContent;
|
||||
using Umbraco.Cms.Core.PublishedCache;
|
||||
using Umbraco.Cms.Core.Xml;
|
||||
using Umbraco.Cms.Infrastructure.Examine;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
@@ -129,10 +127,6 @@ public class PublishedContentQuery : IPublishedContentQuery
|
||||
return null;
|
||||
}
|
||||
|
||||
[Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
|
||||
public IPublishedContent? ContentSingleAtXPath(string xpath, params XPathVariable[] vars)
|
||||
=> ItemByXPath(xpath, vars, _publishedSnapshot.Content);
|
||||
|
||||
public IEnumerable<IPublishedContent> Content(IEnumerable<int> ids)
|
||||
=> ItemsByIds(_publishedSnapshot.Content, ids);
|
||||
|
||||
@@ -142,14 +136,6 @@ public class PublishedContentQuery : IPublishedContentQuery
|
||||
public IEnumerable<IPublishedContent> Content(IEnumerable<object> ids)
|
||||
=> ids.Select(Content).WhereNotNull();
|
||||
|
||||
[Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
|
||||
public IEnumerable<IPublishedContent> ContentAtXPath(string xpath, params XPathVariable[] vars)
|
||||
=> ItemsByXPath(xpath, vars, _publishedSnapshot.Content);
|
||||
|
||||
[Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
|
||||
public IEnumerable<IPublishedContent> ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars)
|
||||
=> ItemsByXPath(xpath, vars, _publishedSnapshot.Content);
|
||||
|
||||
public IEnumerable<IPublishedContent> ContentAtRoot()
|
||||
=> ItemsAtRoot(_publishedSnapshot.Content);
|
||||
|
||||
@@ -215,23 +201,12 @@ public class PublishedContentQuery : IPublishedContentQuery
|
||||
private static IPublishedContent? ItemById(Guid id, IPublishedCache? cache)
|
||||
=> cache?.GetById(id);
|
||||
|
||||
private static IPublishedContent? ItemByXPath(string xpath, XPathVariable[] vars, IPublishedCache? cache)
|
||||
=> cache?.GetSingleByXPath(xpath, vars);
|
||||
|
||||
private static IEnumerable<IPublishedContent> ItemsByIds(IPublishedCache? cache, IEnumerable<int> ids)
|
||||
=> ids.Select(eachId => ItemById(eachId, cache)).WhereNotNull();
|
||||
|
||||
private IEnumerable<IPublishedContent> ItemsByIds(IPublishedCache? cache, IEnumerable<Guid> ids)
|
||||
=> ids.Select(eachId => ItemById(eachId, cache)).WhereNotNull();
|
||||
|
||||
private static IEnumerable<IPublishedContent> ItemsByXPath(string xpath, XPathVariable[] vars,
|
||||
IPublishedCache? cache)
|
||||
=> cache?.GetByXPath(xpath, vars) ?? Array.Empty<IPublishedContent>();
|
||||
|
||||
private static IEnumerable<IPublishedContent> ItemsByXPath(XPathExpression xpath, XPathVariable[] vars,
|
||||
IPublishedCache? cache)
|
||||
=> cache?.GetByXPath(xpath, vars) ?? Array.Empty<IPublishedContent>();
|
||||
|
||||
private static IEnumerable<IPublishedContent> ItemsAtRoot(IPublishedCache? cache)
|
||||
=> cache?.GetAtRoot() ?? Array.Empty<IPublishedContent>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user