/// <summary> /// Determines whether the specified <paramref name="stereotype"/> is allowed to have no parent. /// </summary> /// <param name="stereotype">The candidate stereotype.</param> /// <returns> /// <c>true</c> if the specified <paramref name="stereotype"/> is allowed to have no parent; otherwise, <c>false</c>. /// </returns> /// <remarks>This is "ParentType1" - root stereotypes don't have a parent.</remarks> public static bool IsNoParentAllowed(CslaObjectType stereotype) { _specificErrorMessage = string.Empty; BrokenRuleMsg = string.Empty; if (stereotype.IsEditableRoot() || stereotype.IsEditableRootCollection() || stereotype.IsDynamicEditableRootCollection() || stereotype.IsReadOnlyObject() || stereotype.IsReadOnlyCollection() || stereotype.IsBaseClass() || stereotype.IsCriteriaClass()) { return(true); } BrokenRuleMsg = stereotype + " must have a ParentType."; return(false); }
public static bool IsNotBaseClass(this CslaObjectType cslaType) { return(!cslaType.IsBaseClass()); }