private void SetAllowedChildTypes(IEnumerable<ContentType> contentTypes, bool throwOnError = true, bool save = false)
{
var currentTypes = this.AllowedChildTypes;
if (currentTypes.Count() == 0)
currentTypes = this.ContentType.AllowedChildTypes;
var addList = contentTypes.Except(currentTypes);
if (addList.Count() == 0)
return;
var list = currentTypes.Union(contentTypes).Distinct();
this.AllowedChildTypes = list.ToArray();
if (save)
this.Save();
}
private Exception GetCannotAllowContentTypeException()