public IEnumerable <IConceptInfo> CreateNewConcepts(IEnumerable <IConceptInfo> existingConcepts) { var newConcepts = new List <IConceptInfo>(); DslUtility.ValidatePropertyListSyntax(KeyProperties, this); newConcepts.AddRange(KeyProperties.Split(' ').Select <string, IConceptInfo>(propertyName => { if (propertyName == "ID") { return new KeyPropertyIDComputedFromInfo { EntityComputedFrom = new EntityComputedFromInfo { Target = Persisted } } } ; else { return new KeyPropertyComputedFromInfo { PropertyComputedFrom = new PropertyComputedFromInfo { Target = new PropertyInfo { Name = propertyName, DataStructure = Persisted } } } }; })); return(newConcepts); }
public void CheckSemantics(IDslModel existingConcepts) { if (!IsSupported(DataStructure)) { throw new DslSyntaxException(this, $"SQL index can only be used in a writable data structure." + $" '{DataStructure.FullName}' is a '{DataStructure.GetKeywordOrTypeName()}'."); } DslUtility.ValidatePropertyListSyntax(PropertyNames, this); }
public void CheckSemantics(IEnumerable <IConceptInfo> concepts) { if (!IsSupported(DataStructure)) { throw new DslSyntaxException( string.Format("{0} must be used inside writable data structure. DateStructure {1} is of type {2}.", this.GetUserDescription(), DataStructure, DataStructure.GetType().FullName)); } DslUtility.ValidatePropertyListSyntax(PropertyNames, this); }
public IEnumerable <IConceptInfo> CreateNewConcepts(ComputedFromKeyPropertiesInfo conceptInfo, IDslModel existingConcepts) { DslUtility.ValidatePropertyListSyntax(conceptInfo.KeyProperties, conceptInfo); var keyProperties = conceptInfo.CreateKeyProperties(existingConcepts); // If *not all* listed property names are found in the DSL model, wait for more iterations of macro evaluation, // or return an error in the IValidatedConcept implementation above. if (!keyProperties.Values.All(kp => kp != null)) { return(null); } else { return(keyProperties.Values); } }
public void CheckSemantics(IEnumerable <IConceptInfo> concepts) { CheckIfSupported(DataStructure, this); DslUtility.ValidatePropertyListSyntax(PropertyNames, this); }
public void CheckSemantics(IDslModel existingConcepts) { DslUtility.ValidatePropertyListSyntax(ExceptProperties, this); }
public void CheckSemantics(IEnumerable <IConceptInfo> existingConcepts) { DslUtility.ValidatePropertyListSyntax(ExceptProperties, this); }