using System; using System.Runtime.Serialization; using Umbraco.Cms.Core.Models.Entities; namespace Umbraco.Cms.Core.Models { /// /// Implements . /// [Serializable] [DataContract(IsReference = true)] public class KeyValue : EntityBase, IKeyValue, IEntity { private string _identifier; private string _value; /// public string Identifier { get => _identifier; set => SetPropertyValueAndDetectChanges(value, ref _identifier, nameof(Identifier)); } /// public string Value { get => _value; set => SetPropertyValueAndDetectChanges(value, ref _value, nameof(Value)); } bool IEntity.HasIdentity => !string.IsNullOrEmpty(Identifier); } }