/// <summary> /// <para>Initializes a new instance of the <see cref="DomainValidatorAttribute"/>.</para> /// </summary> /// <param name="domain">List of values to be used in the validation.</param> public DomainValidatorAttribute(params object[] domain) : base() { ValidatorArgumentsValidatorHelper.ValidateDomainValidator(domain); this.domain = domain; }
/// <summary> /// <para>Initializes a new instance of the <see cref="DomainValidator{T}"/>.</para> /// </summary> /// <param name="domain">List of values to be used in the validation.</param> /// <param name="messageTemplate">The message template to use when logging results.</param> /// <param name="negated">True if the validator must negate the result of the validation.</param> public DomainValidator(IEnumerable <T> domain, string messageTemplate, bool negated) : base(messageTemplate, null, negated) { ValidatorArgumentsValidatorHelper.ValidateDomainValidator(domain); this.domain = domain; }