V12: Deprecate XPath (#14372)

* Deprecate all outward facing methods that uses XPath

* Add more obsolete messages

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
This commit is contained in:
Nikolaj Geisle
2023-07-07 11:12:04 +02:00
committed by GitHub
parent 16c78b76dd
commit d116366b28
41 changed files with 97 additions and 0 deletions

View File

@@ -174,6 +174,7 @@ public class UmbracoHelper
private IPublishedContent? ContentForObject(object id) => _publishedContentQuery.Content(id);
[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public IPublishedContent? ContentSingleAtXPath(string xpath, params XPathVariable[] vars) =>
_publishedContentQuery.ContentSingleAtXPath(xpath, vars);
@@ -286,9 +287,11 @@ public class UmbracoHelper
/// <remarks>If an identifier does not match an existing content, it will be missing in the returned value.</remarks>
public IEnumerable<IPublishedContent> Content(IEnumerable<int> ids) => _publishedContentQuery.Content(ids);
[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) =>
_publishedContentQuery.ContentAtXPath(xpath, vars);
[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) =>
_publishedContentQuery.ContentAtXPath(xpath, vars);