public void CheckSemantics(IDslModel existingConcepts) { if (!(Subtype is IOrmDataStructure)) { throw new DslSyntaxException(this, "Is (polymorphic) may only be used on a database-mapped data structure, such as Entity or SqlQueryable. " + this.Subtype.GetUserDescription() + " is not IOrmDataStructure."); } if (ImplementationName == null) { throw new DslSyntaxException(this, "ImplementationName must not be null. It is allowed to be an empty string."); } if (!string.IsNullOrEmpty(ImplementationName)) { DslUtility.ValidateIdentifier(ImplementationName, this, "Invalid ImplementationName value."); } if (existingConcepts.FindByReference <PolymorphicMaterializedInfo>(pm => pm.Polymorphic, Supertype).Any()) { // Verifying if the ChangesOnChangedItemsInfo can be created (see IsSubtypeOfMacro) var dependsOn = DslUtility.GetBaseChangesOnDependency(Subtype, existingConcepts); if (dependsOn.Count() == 0) { throw new DslSyntaxException(this, Subtype.GetUserDescription() + " should be an *extension* of an entity. Otherwise it cannot be used in a materialized polymorphic entity because the system cannot detect when to update the persisted data."); } } }
public void CheckSemantics(IDslModel existingConcepts) { DslUtility.ValidateIdentifier(Name, this); }
public void CheckSemantics(IDslModel existingConcepts) { DslUtility.ValidateIdentifier(BaseSelector, this, "BaseSelector should be set to a property name from '" + DerivedProperty.DataStructure.GetKeyProperties() + "' class."); }
public void CheckSemantics(IDslModel existingConcepts) { DslUtility.ValidatePath(Browse.Source, Path, existingConcepts, this); DslUtility.ValidateIdentifier(Name, this, "Specify a valid name before the path, to override the generated name."); }
public void CheckSemantics(IEnumerable <IConceptInfo> existingConcepts) { DslUtility.ValidateIdentifier(Name, this); }
public void CheckSemantics(IDslModel existingConcepts) { DslUtility.ValidatePath(LoadOldItems.SaveMethod.Entity, Path, existingConcepts, this); DslUtility.ValidateIdentifier(GetPropertyName(), this); }
public void CheckSemantics(IDslModel existingConcepts) { DslUtility.ValidateIdentifier(RuleName, this, "Invalid RuleName property value."); }