Camel case models for the hostnames dialog

This commit is contained in:
Warren Buckley
2018-10-22 10:20:02 +01:00
parent 9560548b46
commit 2062672eda
3 changed files with 27 additions and 3 deletions

View File

@@ -1,11 +1,15 @@
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "ContentDomainsAndCulture")]
public class ContentDomainsAndCulture
{
[DataMember(Name = "domains")]
public IEnumerable<DomainDisplay> Domains { get; set; }
[DataMember(Name = "language")]
public string Language { get; internal set; }
}
}

View File

@@ -1,16 +1,26 @@
namespace Umbraco.Web.Models.ContentEditing
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "DomainDisplay")]
public class DomainDisplay
{
{
public DomainDisplay(string name, int lang)
{
Name = name;
Lang = lang;
}
[DataMember(Name = "name")]
public string Name { get; }
[DataMember(Name = "lang")]
public int Lang { get; }
[DataMember(Name = "duplicate")]
public bool Duplicate { get; set; }
[DataMember(Name = "other")]
public string Other { get; set; }
}
}

View File

@@ -1,10 +1,20 @@
namespace Umbraco.Web.Models.ContentEditing
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "DomainSave")]
public class DomainSave
{
[DataMember(Name = "valid")]
public bool Valid { get; set; }
[DataMember(Name = "nodeId")]
public int NodeId { get; set; }
[DataMember(Name = "language")]
public int Language { get; set; }
[DataMember(Name = "domains")]
public DomainDisplay[] Domains { get; set; }
}
}