Example #1
0
        public ValidateParameterAttribute(DefaultValidators defaultValidator)
        {
            switch (defaultValidator)
            {
            case DefaultValidators.NullProps:
                _customValidator = new NullPropsValidator();
                break;

            case DefaultValidators.NullPropsNoDefault:
                _customValidator = new NullPropsValidator {
                    CheckValueTypes = true
                };
                break;

            default:
                _customValidator = null;
                break;
            }
        }