Ejemplo n.º 1
0
        public static Dictionary <string, ValidatorInfo[]> GenerateValidators(params ProviderPropertyDefinition[] propertyDefinitions)
        {
            Dictionary <string, ValidatorInfo[]> dictionary = new Dictionary <string, ValidatorInfo[]>(propertyDefinitions.Length);

            foreach (ProviderPropertyDefinition providerPropertyDefinition in propertyDefinitions)
            {
                ValidatorInfo[] array = ValidatorHelper.ValidatorsFromPropertyDefinition(providerPropertyDefinition);
                if (!array.IsNullOrEmpty())
                {
                    dictionary.Add(providerPropertyDefinition.Name, array);
                }
            }
            return(dictionary);
        }
 internal ADObjectNameCharacterValidatorInfo(ADObjectNameCharacterConstraint constraint) : base("ADObjectNameCharacterValidator")
 {
     this.DisplayCharacters = ValidatorHelper.ToVisibleString(constraint.Characters);
     this.InvalidCharacters = new string(constraint.Characters);
 }
Ejemplo n.º 3
0
 internal CharactersConstraintValidatorInfo(CharacterConstraint constraint) : base("CharactersConstraintValidator")
 {
     this.DisplayCharacters = ValidatorHelper.ToVisibleString(constraint.Characters);
     this.Characters        = new string(constraint.Characters);
     this.ShowAsValid       = constraint.ShowAsValid;
 }