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

@@ -40,31 +40,42 @@ public abstract class PublishedCacheBase : IPublishedCache
public IEnumerable<IPublishedContent> GetAtRoot(string? culture = null) => GetAtRoot(PreviewDefault, culture);
[Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract IPublishedContent? GetSingleByXPath(bool preview, string xpath, XPathVariable[] 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 IPublishedContent? GetSingleByXPath(string xpath, XPathVariable[] vars) =>
GetSingleByXPath(PreviewDefault, 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 abstract IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] 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 IPublishedContent? GetSingleByXPath(XPathExpression xpath, XPathVariable[] vars) =>
GetSingleByXPath(PreviewDefault, 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 abstract IEnumerable<IPublishedContent> GetByXPath(bool preview, string xpath, XPathVariable[] 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> GetByXPath(string xpath, XPathVariable[] vars) =>
GetByXPath(PreviewDefault, 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 abstract IEnumerable<IPublishedContent>
GetByXPath(bool preview, XPathExpression xpath, XPathVariable[] 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> GetByXPath(XPathExpression xpath, XPathVariable[] vars) =>
GetByXPath(PreviewDefault, 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 abstract XPathNavigator CreateNavigator(bool preview);
[Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public XPathNavigator CreateNavigator() => CreateNavigator(PreviewDefault);
[Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract XPathNavigator? CreateNodeNavigator(int id, bool preview);
public abstract bool HasContent(bool preview);