Migrating some more classes that are using EntityBasic
This commit is contained in:
@@ -5,7 +5,6 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core;
|
||||
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
@@ -37,7 +37,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (CompositeContentTypes.Any(x => x.IsNullOrWhiteSpace()))
|
||||
yield return new ValidationResult("Composite Content Type value cannot be null", new[] {"CompositeContentTypes"});
|
||||
yield return new ValidationResult("Composite Content Type value cannot be null", new[] { "CompositeContentTypes" });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
var lastIndex = Groups.IndexOf(duplicateGroups.Last().Last());
|
||||
yield return new ValidationResult("Duplicate group names not allowed", new[]
|
||||
{
|
||||
string.Format("Groups[{0}].Name", lastIndex)
|
||||
$"Groups[{lastIndex}].Name"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -102,10 +102,9 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
|
||||
yield return new ValidationResult("Duplicate property aliases not allowed: " + lastProperty.Alias, new[]
|
||||
{
|
||||
string.Format("Groups[{0}].Properties[{1}].Alias", propertyGroup.SortOrder, lastProperty.SortOrder)
|
||||
$"Groups[{propertyGroup.SortOrder}].Properties[{lastProperty.SortOrder}].Alias"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@@ -34,6 +33,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
[DataMember(Name = "notifications")]
|
||||
public List<BackOfficeNotification> Notifications { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
[IgnoreDataMember]
|
||||
public IDataEditor PropertyEditor { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,8 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
public DictionaryDisplay()
|
||||
{
|
||||
this.Notifications = new List<BackOfficeNotification>();
|
||||
this.Translations = new List<DictionaryTranslationDisplay>();
|
||||
Notifications = new List<BackOfficeNotification>();
|
||||
Translations = new List<DictionaryTranslationDisplay>();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -14,8 +14,8 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// Initializes a new instance of the <see cref="DictionarySave"/> class.
|
||||
/// </summary>
|
||||
public DictionarySave()
|
||||
{
|
||||
this.Translations = new List<DictionaryTranslationSave>();
|
||||
{
|
||||
Translations = new List<DictionaryTranslationSave>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -30,6 +30,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
|
||||
[DataMember(Name = "apps")]
|
||||
public IEnumerable<ContentApp> ContentApps { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
public MacroDisplay()
|
||||
{
|
||||
this.Notifications = new List<BackOfficeNotification>();
|
||||
this.Parameters = new List<MacroParameterDisplay>();
|
||||
Notifications = new List<BackOfficeNotification>();
|
||||
Parameters = new List<MacroParameterDisplay>();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -1,9 +1,8 @@
|
||||
using System.Runtime.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
[DataContract(Name = "memberGroup", Namespace = "")]
|
||||
public class MemberGroupDisplay : EntityBasic, INotificationModel
|
||||
{
|
||||
@@ -5,6 +5,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataContract(Name = "contentType", Namespace = "")]
|
||||
public class MemberTypeDisplay : ContentTypeCompositionDisplay<MemberPropertyTypeDisplay>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
/// </summary>
|
||||
public class MemberTypeSave : ContentTypeSave<MemberPropertyTypeBasic>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
[DataMember(Name = "score")]
|
||||
public float Score { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
@@ -78,6 +77,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "updateDate")]
|
||||
[ReadOnly(true)]
|
||||
public DateTime UpdateDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
@@ -74,7 +72,6 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
yield return new ValidationResult("A permission value cannot be null or empty", new[] { "AssignedPermissions" });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
@@ -1,5 +1,4 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -7,7 +6,6 @@ using System.Runtime.Serialization;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.ContentEditing;
|
||||
using Umbraco.Core.Serialization;
|
||||
using Umbraco.Web.Routing;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
@@ -33,7 +31,6 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
|
||||
[DataMember(Name = "udi")]
|
||||
[ReadOnly(true)]
|
||||
[JsonConverter(typeof(UdiJsonConverter))]
|
||||
public Udi Udi { get; set; }
|
||||
|
||||
[DataMember(Name = "icon")]
|
||||
@@ -151,7 +148,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// <remarks>
|
||||
/// By default this is true but by using events developers can toggle this off for certain documents if there is nothing to preview
|
||||
/// </remarks>
|
||||
[DataMember( Name = "allowPreview" )]
|
||||
[DataMember(Name = "allowPreview")]
|
||||
public bool AllowPreview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Converters;
|
||||
@@ -38,7 +37,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
[IgnoreDataMember]
|
||||
[JsonIgnore]
|
||||
IEnumerable<ContentPropertyDisplay> IContentProperties<ContentPropertyDisplay>.Properties => Tabs.SelectMany(x => x.Properties);
|
||||
IEnumerable<ContentPropertyDisplay> IContentProperties<ContentPropertyDisplay>.Properties => Tabs.SelectMany(x => x.Properties);
|
||||
|
||||
/// <summary>
|
||||
/// The language/culture assigned to this content variation
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user