2018-07-21 09:41:07 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Models.PublishedContent
|
2018-05-02 13:38:45 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Provides a noop implementation for <see cref="IPublishedValueFallback"/>.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// <para>This is for tests etc - does not implement fallback at all.</para>
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
public class NoopPublishedValueFallback : IPublishedValueFallback
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc />
|
2018-07-21 09:41:07 +02:00
|
|
|
|
public object GetValue(IPublishedProperty property, string culture, string segment, object defaultValue, ICollection<int> visitedLanguages) => defaultValue;
|
2018-05-02 13:38:45 +02:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2018-07-21 09:41:07 +02:00
|
|
|
|
public T GetValue<T>(IPublishedProperty property, string culture, string segment, T defaultValue, ICollection<int> visitedLanguages) => defaultValue;
|
2018-05-02 13:38:45 +02:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2018-07-21 09:41:07 +02:00
|
|
|
|
public object GetValue(IPublishedElement content, string alias, string culture, string segment, object defaultValue, ICollection<int> visitedLanguages) => defaultValue;
|
2018-05-02 13:38:45 +02:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2018-07-21 09:41:07 +02:00
|
|
|
|
public T GetValue<T>(IPublishedElement content, string alias, string culture, string segment, T defaultValue, ICollection<int> visitedLanguages) => defaultValue;
|
2018-05-02 13:38:45 +02:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2018-07-21 15:58:49 +02:00
|
|
|
|
public object GetValue(IPublishedContent content, string alias, string culture, string segment, object defaultValue, IEnumerable<int> fallbackMethods, ICollection<int> visitedLanguages) => defaultValue;
|
2018-05-02 13:38:45 +02:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2018-07-21 15:58:49 +02:00
|
|
|
|
public T GetValue<T>(IPublishedContent content, string alias, string culture, string segment, T defaultValue, IEnumerable<int> fallbackMethods, ICollection<int> visitedLanguages) => defaultValue;
|
2018-05-02 13:38:45 +02:00
|
|
|
|
}
|
2018-07-08 15:17:38 +02:00
|
|
|
|
}
|