Make lots of models nullable

This commit is contained in:
Nikolaj Geisle
2022-01-21 11:43:58 +01:00
parent b6d5465b49
commit 936dd38c55
278 changed files with 1379 additions and 1237 deletions

View File

@@ -36,11 +36,11 @@ namespace Umbraco.Cms.Core.Models.ContentEditing
//These need explicit implementation because we are using internal models
/// <inheritdoc />
[IgnoreDataMember]
TPersisted IContentSave<TPersisted>.PersistedContent { get; set; }
TPersisted? IContentSave<TPersisted>.PersistedContent { get; set; }
//Non explicit internal getter so we don't need to explicitly cast in our own code
[IgnoreDataMember]
public TPersisted PersistedContent
public TPersisted? PersistedContent
{
get => ((IContentSave<TPersisted>)this).PersistedContent;
set => ((IContentSave<TPersisted>) this).PersistedContent = value;
@@ -55,7 +55,7 @@ namespace Umbraco.Cms.Core.Models.ContentEditing
/// This is not used for outgoing model information.
/// </remarks>
[IgnoreDataMember]
public ContentPropertyCollectionDto PropertyCollectionDto { get; set; }
public ContentPropertyCollectionDto? PropertyCollectionDto { get; set; }
#endregion
}