diff --git a/src/Umbraco.Core/Models/DictionaryItem.cs b/src/Umbraco.Core/Models/DictionaryItem.cs index 3790711ce1..439e3de082 100644 --- a/src/Umbraco.Core/Models/DictionaryItem.cs +++ b/src/Umbraco.Core/Models/DictionaryItem.cs @@ -1,10 +1,16 @@ using System; using System.Collections.Generic; using System.Reflection; +using System.Runtime.Serialization; using Umbraco.Core.Models.EntityBase; namespace Umbraco.Core.Models { + /// + /// Represents a Dictionary Item + /// + [Serializable] + [DataContract(IsReference = true)] public class DictionaryItem : Entity { private Guid _parentId; @@ -22,6 +28,10 @@ namespace Umbraco.Core.Models private static readonly PropertyInfo ItemKeySelector = ExpressionHelper.GetPropertyInfo(x => x.ItemKey); private static readonly PropertyInfo TranslationsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Translations); + /// + /// Gets or Sets the Parent Id of the Dictionary Item + /// + [DataMember] public Guid ParentId { get { return _parentId; } @@ -31,7 +41,11 @@ namespace Umbraco.Core.Models OnPropertyChanged(ParentIdSelector); } } - + + /// + /// Gets or sets the Key for the Dictionary Item + /// + [DataMember] public string ItemKey { get { return _itemKey; } @@ -42,6 +56,10 @@ namespace Umbraco.Core.Models } } + /// + /// Gets or sets a list of translations for the Dictionary Item + /// + [DataMember] public IEnumerable Translations { get { return _translations; } diff --git a/src/Umbraco.Core/Models/DictionaryTranslation.cs b/src/Umbraco.Core/Models/DictionaryTranslation.cs index c705face90..ad6daa5570 100644 --- a/src/Umbraco.Core/Models/DictionaryTranslation.cs +++ b/src/Umbraco.Core/Models/DictionaryTranslation.cs @@ -1,9 +1,15 @@ using System; using System.Reflection; +using System.Runtime.Serialization; using Umbraco.Core.Models.EntityBase; namespace Umbraco.Core.Models { + /// + /// Represents a translation for a + /// + [Serializable] + [DataContract(IsReference = true)] public class DictionaryTranslation : Entity { private Language _language; @@ -25,6 +31,10 @@ namespace Umbraco.Core.Models private static readonly PropertyInfo LanguageSelector = ExpressionHelper.GetPropertyInfo(x => x.Language); private static readonly PropertyInfo ValueSelector = ExpressionHelper.GetPropertyInfo(x => x.Value); + /// + /// Gets or sets the for the translation + /// + [DataMember] public Language Language { get { return _language; } @@ -35,6 +45,10 @@ namespace Umbraco.Core.Models } } + /// + /// Gets or sets the translated text + /// + [DataMember] public string Value { get { return _value; } diff --git a/src/Umbraco.Core/Models/Language.cs b/src/Umbraco.Core/Models/Language.cs index 27ce5de7f8..6587711557 100644 --- a/src/Umbraco.Core/Models/Language.cs +++ b/src/Umbraco.Core/Models/Language.cs @@ -1,9 +1,16 @@ -using System.Globalization; +using System; +using System.Globalization; using System.Reflection; +using System.Runtime.Serialization; using Umbraco.Core.Models.EntityBase; namespace Umbraco.Core.Models { + /// + /// Represents a Language + /// + [Serializable] + [DataContract(IsReference = true)] public class Language : Entity { private string _isoCode; @@ -17,6 +24,10 @@ namespace Umbraco.Core.Models private static readonly PropertyInfo IsoCodeSelector = ExpressionHelper.GetPropertyInfo(x => x.IsoCode); private static readonly PropertyInfo CultureNameSelector = ExpressionHelper.GetPropertyInfo(x => x.CultureName); + /// + /// Gets or sets the Iso Code for the Language + /// + [DataMember] public string IsoCode { get { return _isoCode; } @@ -27,6 +38,10 @@ namespace Umbraco.Core.Models } } + /// + /// Gets or sets the Culture Name for the Language + /// + [DataMember] public string CultureName { get { return _cultureName; } @@ -37,6 +52,10 @@ namespace Umbraco.Core.Models } } + /// + /// Returns a object for the current Language + /// + [IgnoreDataMember] public CultureInfo CultureInfo { get { return CultureInfo.CreateSpecificCulture(IsoCode); }