示例#1
0
 public bool IsPropertyValueValid(string propertyName, ref string errorMessageTemplate,
                                  ContextIdentifiers contextIdentifiers, string ruleId)
 {
     if (propertyName == this.GetPropertyInfo(x => x.MergedObjectType).Name&& MergedObjectType != null)
     {
         if (BaseType == null && BaseClassInfo == null)
         {
             errorMessageTemplate = "One of " + this.GetPropertyInfo(x => x.BaseType).Name + ", " +
                                    this.GetPropertyInfo(x => x.BaseClassInfo).Name + " should not be null";
             return(false);
         }
         if (TypeAttributes.Where(info => info is PersistentMapInheritanceAttribute).FirstOrDefault() == null)
         {
             errorMessageTemplate = typeof(PersistentMapInheritanceAttribute).Name + " is required";
             return(false);
         }
     }
     return(true);
 }