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

@@ -24,7 +24,7 @@ namespace Umbraco.Cms.Core.Models.Email
public bool IsBodyHtml { get; }
public IList<EmailMessageAttachment> Attachments { get; }
public IList<EmailMessageAttachment>? Attachments { get; }
public bool HasAttachments => Attachments != null && Attachments.Count > 0;
@@ -47,7 +47,7 @@ namespace Umbraco.Cms.Core.Models.Email
Subject = subject;
Body = body;
IsBodyHtml = isBodyHtml;
Attachments = attachments?.ToList();
Attachments = attachments.ToList();
}
}