public ItemIdValidation(HttpParameterDescriptor desc) : base(desc)
    {
        var defaultUrl = new FromUriAttribute();

        this.DefaultUriBinding      = defaultUrl.GetBinding(desc);
        this.ValueProviderFactories = defaultUrl.GetValueProviderFactories(desc.Configuration);
    }
 public MinWithStatusParameterBinding(HttpParameterDescriptor desc, int minValue)
     : base(desc)
 {
     _minValue = minValue;
     var defaultUrl = new FromUriAttribute();
     this.DefaultUriBinding = defaultUrl.GetBinding(desc);
     this.ValueProviderFactories = defaultUrl.GetValueProviderFactories(desc.Configuration);
 }
Exemplo n.º 3
0
        public ParameterValidatorAttribute(HttpParameterDescriptor desc, string regex)
            : base(desc)
        {
            this.regex = regex;
            var defaultUrl = new FromUriAttribute();

            DefaultUriBinding      = defaultUrl.GetBinding(desc);
            ValueProviderFactories = defaultUrl.GetValueProviderFactories(desc.Configuration);
        }