Merge remote-tracking branch 'origin/temp8' into temp8-U4-11220
# Conflicts: # src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.cs
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
/// <para>Other caches that get their raw value from the database would consider that a property has "no
|
||||
/// value" if it is missing, null, or an empty string (including whitespace-only).</para>
|
||||
/// </remarks>
|
||||
bool HasValue(int? languageId = null, string segment = null);
|
||||
bool HasValue(string culture = null, string segment = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the source value of the property.
|
||||
@@ -35,7 +35,7 @@
|
||||
/// <para>If you're using that value, you're probably wrong, unless you're doing some internal
|
||||
/// Umbraco stuff.</para>
|
||||
/// </remarks>
|
||||
object GetSourceValue(int? languageId = null, string segment = null);
|
||||
object GetSourceValue(string culture = null, string segment = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the object value of the property.
|
||||
@@ -45,7 +45,7 @@
|
||||
/// <para>It can be null, or any type of CLR object.</para>
|
||||
/// <para>It has been fully prepared and processed by the appropriate converter.</para>
|
||||
/// </remarks>
|
||||
object GetValue(int? languageId = null, string segment = null);
|
||||
object GetValue(string culture = null, string segment = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XPath value of the property.
|
||||
@@ -55,6 +55,6 @@
|
||||
/// <para>It must be either null, or a string, or an XPathNavigator.</para>
|
||||
/// <para>It has been fully prepared and processed by the appropriate converter.</para>
|
||||
/// </remarks>
|
||||
object GetXPathValue(int? languageId = null, string segment = null);
|
||||
object GetXPathValue(string culture = null, string segment = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,15 +53,15 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
public string Alias => PropertyType.Alias;
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract bool HasValue(int? languageId = null, string segment = null);
|
||||
public abstract bool HasValue(string culture = null, string segment = null);
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract object GetSourceValue(int? languageId = null, string segment = null);
|
||||
public abstract object GetSourceValue(string culture = null, string segment = null);
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract object GetValue(int? languageId = null, string segment = null);
|
||||
public abstract object GetValue(string culture = null, string segment = null);
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract object GetXPathValue(int? languageId = null, string segment = null);
|
||||
public abstract object GetXPathValue(string culture = null, string segment = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,20 +20,20 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
private readonly Lazy<object> _objectValue;
|
||||
private readonly Lazy<object> _xpathValue;
|
||||
|
||||
public override object GetSourceValue(int? languageId = null, string segment = null)
|
||||
=> languageId == null & segment == null ? _sourceValue : null;
|
||||
public override object GetSourceValue(string culture = null, string segment = null)
|
||||
=> culture == null & segment == null ? _sourceValue : null;
|
||||
|
||||
public override bool HasValue(int? languageId = null, string segment = null)
|
||||
public override bool HasValue(string culture = null, string segment = null)
|
||||
{
|
||||
var sourceValue = GetSourceValue(languageId, segment);
|
||||
var sourceValue = GetSourceValue(culture, segment);
|
||||
return sourceValue is string s ? !string.IsNullOrWhiteSpace(s) : sourceValue != null;
|
||||
}
|
||||
|
||||
public override object GetValue(int? languageId = null, string segment = null)
|
||||
=> languageId == null & segment == null ? _objectValue.Value : null;
|
||||
public override object GetValue(string culture = null, string segment = null)
|
||||
=> culture == null & segment == null ? _objectValue.Value : null;
|
||||
|
||||
public override object GetXPathValue(int? languageId = null, string segment = null)
|
||||
=> languageId == null & segment == null ? _xpathValue.Value : null;
|
||||
public override object GetXPathValue(string culture = null, string segment = null)
|
||||
=> culture == null & segment == null ? _xpathValue.Value : null;
|
||||
|
||||
public RawValueProperty(PublishedPropertyType propertyType, IPublishedElement content, object sourceValue, bool isPreviewing = false)
|
||||
: base(propertyType, PropertyCacheLevel.Unknown) // cache level is ignored
|
||||
|
||||
Reference in New Issue
Block a user