Fixing issue #13865 (i.e. Rich text link picker not resolving correct variant when using .ValueFor()). (#13889)

This commit is contained in:
Joel Mandell
2023-03-20 15:52:36 +01:00
committed by GitHub
parent 5d3e3a4c71
commit 451d1cec6a
3 changed files with 30 additions and 0 deletions

View File

@@ -5,6 +5,11 @@ namespace Umbraco.Cms.Core.Models.PublishedContent;
/// </summary>
public interface IPublishedValueFallback
{
/// <summary>
/// VariationContextAccessor that is not required to be implemented, therefore throws NotImplementedException as default.
/// </summary>
IVariationContextAccessor VariationContextAccessor { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } }
/// <summary>
/// Tries to get a fallback value for a property.
/// </summary>

View File

@@ -20,6 +20,8 @@ public class PublishedValueFallback : IPublishedValueFallback
_variationContextAccessor = variationContextAccessor;
}
public IVariationContextAccessor VariationContextAccessor { get { return _variationContextAccessor; } }
/// <inheritdoc />
public bool TryGetValue(IPublishedProperty property, string? culture, string? segment, Fallback fallback, object? defaultValue, out object? value) =>
TryGetValue<object>(property, culture, segment, fallback, defaultValue, out value);