Now use empty string for invariant in published

This commit is contained in:
Stephan
2018-04-30 21:03:43 +02:00
parent 038fc87a40
commit dbf310caf1
41 changed files with 154 additions and 146 deletions

View File

@@ -154,7 +154,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
public override string Name => _name;
public override PublishedCultureInfos GetCulture(string culture = ".") => throw new NotSupportedException();
public override PublishedCultureInfos GetCulture(string culture = null) => throw new NotSupportedException();
public override IReadOnlyDictionary<string, PublishedCultureInfos> Cultures => throw new NotSupportedException();

View File

@@ -150,7 +150,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
}
}
public override PublishedCultureInfos GetCulture(string culture = ".") => throw new NotSupportedException();
public override PublishedCultureInfos GetCulture(string culture = null) => throw new NotSupportedException();
public override IReadOnlyDictionary<string, PublishedCultureInfos> Cultures => throw new NotSupportedException();

View File

@@ -27,13 +27,13 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
/// <summary>
/// Gets the raw value of the property.
/// </summary>
public override object GetSourceValue(string culture = ".", string segment = ".") => _sourceValue;
public override object GetSourceValue(string culture = null, string segment = null) => _sourceValue;
// in the Xml cache, everything is a string, and to have a value
// you want to have a non-null, non-empty string.
public override bool HasValue(string culture = ".", string segment = ".") => _sourceValue.Trim().Length > 0;
public override bool HasValue(string culture = null, string segment = null) => _sourceValue.Trim().Length > 0;
public override object GetValue(string culture = ".", string segment = ".")
public override object GetValue(string culture = null, string segment = null)
{
// NOT caching the source (intermediate) value since we'll never need it
// everything in Xml cache is per-request anyways