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.FirstOrDefault(info => info is PersistentMapInheritanceAttribute) == null) { errorMessageTemplate = typeof(PersistentMapInheritanceAttribute).Name + " is required"; return(false); } } return(true); }