Merge remote-tracking branch 'origin/v8/dev' into netcore/dev

# Conflicts:
#	src/Umbraco.Web.UI.Client/gulp/tasks/watchTask.js
This commit is contained in:
Bjarke Berg
2020-06-05 07:54:14 +02:00
26 changed files with 484 additions and 116 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using Newtonsoft.Json;
namespace Umbraco.Web.PublishedCache.NuCache.DataSource
@@ -8,21 +9,43 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
private string _culture;
private string _segment;
[JsonProperty("culture")]
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate, PropertyName = "c")]
public string Culture
{
get => _culture;
set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // TODO: or fallback to string.Empty? CANNOT be null
}
[JsonProperty("seg")]
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate, PropertyName = "s")]
public string Segment
{
get => _segment;
set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // TODO: or fallback to string.Empty? CANNOT be null
}
[JsonProperty("val")]
[JsonProperty("v")]
public object Value { get; set; }
//Legacy properties used to deserialize existing nucache db entries
[JsonProperty("culture")]
private string LegacyCulture
{
set => Culture = value;
}
[JsonProperty("seg")]
private string LegacySegment
{
set => Segment = value;
}
[JsonProperty("val")]
private object LegacyValue
{
set => Value = value;
}
}
}