Start work on controllers

This commit is contained in:
Nikolaj Geisle
2022-04-01 11:09:51 +02:00
parent 0fc310cc4e
commit 1a6f0e4d7b
71 changed files with 665 additions and 543 deletions

View File

@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Core.Models.ContentEditing
/// Gets or sets the configuration field key.
/// </summary>
[DataMember(Name = "key", IsRequired = true)]
public string? Key { get; set; }
public string Key { get; set; } = null!;
/// <summary>
/// Gets or sets the configuration field value.

View File

@@ -56,7 +56,7 @@ namespace Umbraco.Cms.Core.Models.ContentEditing
/// Gets or sets the view.
/// </summary>
[DataMember(Name = "view")]
public string? View { get; set; }
public string View { get; set; } = null!;
/// <summary>
/// Gets or sets the parameters.

View File

@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Core.Models.ContentEditing
/// Gets or sets the key.
/// </summary>
[DataMember(Name = "key")]
public string? Key { get; set; }
public string Key { get; set; } = null!;
/// <summary>
/// Gets or sets the label.
@@ -24,7 +24,7 @@ namespace Umbraco.Cms.Core.Models.ContentEditing
/// Gets or sets the editor.
/// </summary>
[DataMember(Name = "editor")]
public string? Editor { get; set; }
public string Editor { get; set; } = null!;
/// <summary>
/// Gets or sets the id.

View File

@@ -30,12 +30,12 @@ namespace Umbraco.Cms.Core.Models.Editors
/// <summary>
/// Gets or sets the unique identifier of the content owning the property.
/// </summary>
public Guid ContentKey { get; set; }
public Guid? ContentKey { get; set; }
/// <summary>
/// Gets or sets the unique identifier of the property type.
/// </summary>
public Guid PropertyTypeKey { get; set; }
public Guid? PropertyTypeKey { get; set; }
/// <summary>
/// Gets or sets the uploaded files.

View File

@@ -190,7 +190,7 @@ namespace Umbraco.Extensions
/// <para>This is used both by the content repositories to initialize a property with some tag values, and by the
/// content controllers to update a property with values received from the property editor.</para>
/// </remarks>
public static void SetTagsValue(this IProperty property, IJsonSerializer serializer, object value, TagConfiguration tagConfiguration, string culture)
public static void SetTagsValue(this IProperty property, IJsonSerializer serializer, object? value, TagConfiguration? tagConfiguration, string? culture)
{
if (property == null) throw new ArgumentNullException(nameof(property));
if (tagConfiguration == null) throw new ArgumentNullException(nameof(tagConfiguration));

View File

@@ -30,7 +30,7 @@ namespace Umbraco.Cms.Core.Models
}
public RelationType(string name, string alias, bool isBidrectional, Guid? parentObjectType, Guid? childObjectType, bool isDependency)
public RelationType(string? name, string? alias, bool isBidrectional, Guid? parentObjectType, Guid? childObjectType, bool isDependency)
{
if (name == null) throw new ArgumentNullException(nameof(name));
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value can't be empty or consist only of white-space characters.", nameof(name));

View File

@@ -47,12 +47,12 @@ namespace Umbraco.Cms.Core.Models
return Alias.GetHashCode();
}
public static bool operator ==(UserTourStatus left, UserTourStatus right)
public static bool operator ==(UserTourStatus? left, UserTourStatus? right)
{
return Equals(left, right);
}
public static bool operator !=(UserTourStatus left, UserTourStatus right)
public static bool operator !=(UserTourStatus? left, UserTourStatus? right)
{
return !Equals(left, right);
}