2018-04-28 21:57:07 +02:00
|
|
|
|
using System;
|
2021-06-24 09:43:57 -06:00
|
|
|
|
using System.Runtime.Serialization;
|
2018-04-28 21:57:07 +02:00
|
|
|
|
using Newtonsoft.Json;
|
2018-04-24 01:31:01 +10:00
|
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
|
namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource
|
2018-04-24 01:31:01 +10:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents the culture variation information on a content item
|
|
|
|
|
|
/// </summary>
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[DataContract] // NOTE: Use DataContract annotations here to control how MessagePack serializes/deserializes the data to use INT keys
|
2020-02-06 14:40:46 +01:00
|
|
|
|
public class CultureVariation
|
2018-04-24 01:31:01 +10:00
|
|
|
|
{
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[DataMember(Order = 0)]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("nm")]
|
2018-04-24 01:31:01 +10:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[DataMember(Order = 1)]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("us")]
|
2019-03-05 11:15:30 +01:00
|
|
|
|
public string UrlSegment { get; set; }
|
|
|
|
|
|
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[DataMember(Order = 2)]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("dt")]
|
2018-04-28 21:57:07 +02:00
|
|
|
|
public DateTime Date { get; set; }
|
2018-12-13 15:08:12 +01:00
|
|
|
|
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[DataMember(Order = 3)]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("isd")]
|
2018-12-13 15:08:12 +01:00
|
|
|
|
public bool IsDraft { get; set; }
|
2020-06-02 21:35:19 +12:00
|
|
|
|
|
|
|
|
|
|
//Legacy properties used to deserialize existing nucache db entries
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[IgnoreDataMember]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("name")]
|
|
|
|
|
|
private string LegacyName { set { Name = value; } }
|
|
|
|
|
|
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[IgnoreDataMember]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("urlSegment")]
|
|
|
|
|
|
private string LegacyUrlSegment { set { UrlSegment = value; } }
|
|
|
|
|
|
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[IgnoreDataMember]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("date")]
|
|
|
|
|
|
private DateTime LegacyDate { set { Date = value; } }
|
|
|
|
|
|
|
2021-06-24 09:43:57 -06:00
|
|
|
|
[IgnoreDataMember]
|
2020-06-02 21:35:19 +12:00
|
|
|
|
[JsonProperty("isDraft")]
|
|
|
|
|
|
private bool LegacyIsDraft { set { IsDraft = value; } }
|
2018-04-24 01:31:01 +10:00
|
|
|
|
}
|
|
|
|
|
|
}
|