예제 #1
0
        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> existingConcepts)
 {
     if (!DslUtility.IsQueryable(DataStructure))
     {
         throw new DslSyntaxException(this, "This concept can only be used on a queryable data structure, such as Entity. " + DataStructure.GetKeywordOrTypeName() + " is not queryable.");
     }
     GetInterfaceType();
 }
예제 #3
0
        public void CheckSemantics(IEnumerable <IConceptInfo> concepts)
        {
            if (!DslUtility.IsQueryable(DataStructure))
            {
                throw new DslSyntaxException(this, this.GetKeywordOrTypeName() + " can only be used on a queryable data structure, such as Entity. " + DataStructure.GetKeywordOrTypeName() + " is not queryable.");
            }

            if (!DslUtility.IsQueryable(ReferenceProperty.DataStructure))
            {
                throw new DslSyntaxException(this, this.GetKeywordOrTypeName() + " must reference a queryable data structure, such as Entity. " + ReferenceProperty.DataStructure.GetKeywordOrTypeName() + " is not queryable.");
            }

            if (ReferenceProperty.Referenced != DataStructure)
            {
                throw new DslSyntaxException(this, string.Format(
                                                 "{0} references '{1}' which is a reference to '{2}'. Expected is a reference back to '{3}'.",
                                                 this.GetKeywordOrTypeName(),
                                                 ReferenceProperty.GetUserDescription(),
                                                 ReferenceProperty.Referenced.GetUserDescription(),
                                                 DataStructure.GetUserDescription()));
            }
        }