Merge branch temp8 into temp8-U4-11227
This commit is contained in:
@@ -31,8 +31,8 @@ namespace Umbraco.Core.Models
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ContentBase"/> class.
|
||||
/// </summary>
|
||||
protected ContentBase(string name, int parentId, IContentTypeComposition contentType, PropertyCollection properties)
|
||||
: this(name, contentType, properties)
|
||||
protected ContentBase(string name, int parentId, IContentTypeComposition contentType, PropertyCollection properties, string culture = null)
|
||||
: this(name, contentType, properties, culture)
|
||||
{
|
||||
if (parentId == 0) throw new ArgumentOutOfRangeException(nameof(parentId));
|
||||
ParentId = parentId;
|
||||
@@ -41,22 +41,23 @@ namespace Umbraco.Core.Models
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ContentBase"/> class.
|
||||
/// </summary>
|
||||
protected ContentBase(string name, IContentBase parent, IContentTypeComposition contentType, PropertyCollection properties)
|
||||
: this(name, contentType, properties)
|
||||
protected ContentBase(string name, IContentBase parent, IContentTypeComposition contentType, PropertyCollection properties, string culture = null)
|
||||
: this(name, contentType, properties, culture)
|
||||
{
|
||||
if (parent == null) throw new ArgumentNullException(nameof(parent));
|
||||
SetParent(parent);
|
||||
}
|
||||
|
||||
private ContentBase(string name, IContentTypeComposition contentType, PropertyCollection properties)
|
||||
private ContentBase(string name, IContentTypeComposition contentType, PropertyCollection properties, string culture = null)
|
||||
{
|
||||
ContentTypeBase = contentType ?? throw new ArgumentNullException(nameof(contentType));
|
||||
|
||||
// initially, all new instances have
|
||||
Id = 0; // no identity
|
||||
VersionId = 0; // no versions
|
||||
|
||||
SetName(culture, name);
|
||||
|
||||
Name = name;
|
||||
_contentTypeId = contentType.Id;
|
||||
_properties = properties ?? throw new ArgumentNullException(nameof(properties));
|
||||
_properties.EnsurePropertyTypes(PropertyTypes);
|
||||
|
||||
Reference in New Issue
Block a user