Web.PublishedCache - add XPathNavigatorIsNavigable to caches

This commit is contained in:
Stephan
2013-06-11 09:52:41 +02:00
parent 1ddf2fa365
commit f63514e8ea
5 changed files with 22 additions and 0 deletions

View File

@@ -201,6 +201,12 @@ namespace Umbraco.Web.PublishedCache
/// <returns>The XPath navigator.</returns>
public abstract XPathNavigator GetXPathNavigator(bool preview);
/// <summary>
/// Gets a value indicating whether <c>GetXPathNavigator</c> returns an <c>XPathNavigator</c>
/// and that navigator is a <c>NavigableNavigator</c>.
/// </summary>
public abstract bool XPathNavigatorIsNavigable { get; }
/// <summary>
/// Gets a value indicating whether the underlying non-contextual cache contains content.
/// </summary>

View File

@@ -132,6 +132,12 @@ namespace Umbraco.Web.PublishedCache
return _cache.GetXPathNavigator(UmbracoContext, preview);
}
/// <summary>
/// Gets a value indicating whether <c>GetXPathNavigator</c> returns an <c>XPathNavigator</c>
/// and that navigator is a <c>NavigableNavigator</c>.
/// </summary>
public override bool XPathNavigatorIsNavigable { get { return _cache.XPathNavigatorIsNavigable; } }
/// <summary>
/// Gets a value indicating whether the underlying non-contextual cache contains content.
/// </summary>

View File

@@ -88,6 +88,12 @@ namespace Umbraco.Web.PublishedCache
/// <remarks>The value of <paramref name="preview"/> overrides the context.</remarks>
XPathNavigator GetXPathNavigator(UmbracoContext umbracoContext, bool preview);
/// <summary>
/// Gets a value indicating whether <c>GetXPathNavigator</c> returns an <c>XPathNavigator</c>
/// and that navigator is a <c>NavigableNavigator</c>.
/// </summary>
bool XPathNavigatorIsNavigable { get; }
/// <summary>
/// Gets a value indicating whether the cache contains published content.
/// </summary>

View File

@@ -320,6 +320,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
return xml.CreateNavigator();
}
public virtual bool XPathNavigatorIsNavigable { get { return false; } }
#endregion
#region Legacy Xml

View File

@@ -92,6 +92,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
throw new NotImplementedException("PublishedMediaCache does not support XPath.");
}
public bool XPathNavigatorIsNavigable { get { return false; } }
public virtual bool HasContent(UmbracoContext context, bool preview) { throw new NotImplementedException(); }
private ExamineManager GetExamineManagerSafe()