Get rid of Mandate

This commit is contained in:
Stephan
2017-05-31 09:18:09 +02:00
parent 1e62ea8b16
commit d3133abcab
36 changed files with 188 additions and 330 deletions

View File

@@ -43,9 +43,7 @@ namespace Umbraco.Core.Models
public Content(string name, IContent parent, IContentType contentType, PropertyCollection properties)
: base(name, parent, contentType, properties)
{
Mandate.ParameterNotNull(contentType, "contentType");
_contentType = contentType;
_contentType = contentType ?? throw new ArgumentNullException(nameof(contentType));
PublishedState = PublishedState.Unpublished;
}
@@ -69,9 +67,7 @@ namespace Umbraco.Core.Models
public Content(string name, int parentId, IContentType contentType, PropertyCollection properties)
: base(name, parentId, contentType, properties)
{
Mandate.ParameterNotNull(contentType, "contentType");
_contentType = contentType;
_contentType = contentType ?? throw new ArgumentNullException(nameof(contentType));
PublishedState = PublishedState.Unpublished;
}