Example #1
0
 internal ConditionalStringLengthConstraintAttribute(int minLength, int maxLength, CustomConstraintDelegateEnum applyConstraint) : base(minLength, maxLength)
 {
     this.applyConstraint = applyConstraint;
 }
 internal ConditionallyReadOnlyAttribute(CustomConstraintDelegateEnum isPropertyReadOnly)
 {
     this.isPropertyReadOnly = isPropertyReadOnly;
 }
Example #3
0
 internal ConditionallyRequiredAttribute(CustomConstraintDelegateEnum isPropertyRequired)
 {
     this.isPropertyRequired = isPropertyRequired;
 }
Example #4
0
 internal static StoreObjectConstraint GetConstraint(StorePropertyDefinition propertyDefinition, CustomConstraintDelegateEnum isPropertyRequired)
 {
     return(new OrConstraint(new StoreObjectConstraint[]
     {
         new RequiredPropertyConstraint(propertyDefinition),
         new CustomConstraint(isPropertyRequired, false)
     }));
 }
 internal CustomConstraint(CustomConstraintDelegateEnum delegateEnum, bool objectIsValidIfDelegateIsTrue) : this(delegateEnum.ToString(), CustomConstraint.delegateDictionary[delegateEnum].RelevantProperties, CustomConstraint.delegateDictionary[delegateEnum].IsObjectValidDelegate, objectIsValidIfDelegateIsTrue)
 {
 }