示例#1
0
 internal ConditionalStringLengthConstraintAttribute(int minLength, int maxLength, CustomConstraintDelegateEnum applyConstraint) : base(minLength, maxLength)
 {
     this.applyConstraint = applyConstraint;
 }
 internal ConditionallyReadOnlyAttribute(CustomConstraintDelegateEnum isPropertyReadOnly)
 {
     this.isPropertyReadOnly = isPropertyReadOnly;
 }
示例#3
0
 internal ConditionallyRequiredAttribute(CustomConstraintDelegateEnum isPropertyRequired)
 {
     this.isPropertyRequired = isPropertyRequired;
 }
示例#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)
 {
 }