using Umbraco.Core.Models.PublishedContent;
namespace Umbraco.Web.Models.PublishedContent
{
///
/// Provides a default implementation for .
///
public class PublishedValueFallback : IPublishedValueFallback
{
// this is our default implementation
// kinda reproducing what was available in v7
///
public virtual object GetValue(IPublishedProperty property, string culture, string segment, object defaultValue)
{
// no fallback here
return defaultValue;
}
///
public virtual T GetValue(IPublishedProperty property, string culture, string segment, T defaultValue)
{
// no fallback here
return defaultValue;
}
///
public virtual object GetValue(IPublishedElement content, string alias, string culture, string segment, object defaultValue)
{
// no fallback here
return defaultValue;
}
///
public virtual T GetValue(IPublishedElement content, string alias, string culture, string segment, T defaultValue)
{
// no fallback here
return defaultValue;
}
///
public virtual object GetValue(IPublishedContent content, string alias, string culture, string segment, object defaultValue, bool recurse, PublishedValueFallbackPriority fallbackPriority)
{
// no fallback here
if (!recurse) return defaultValue;
// is that ok?
return GetValue