コード例 #1
0
        public override ValidationResult Validate <T>(T request)
        {
            var req = request as DeleteSourceRequest;

            ValidationResult result;

            result = _requestComponentValidator.RouteId(req.RouteId);

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersionRequired(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersion(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = _requestComponentValidator.HeaderIfMatchRequired(req.HeaderIfMatch);
            }

            if (result == null)
            {
                result = _requestComponentValidator.HeaderIfMatch(req.HeaderIfMatch);
            }

            if (result == null)
            {
                result = new ValidationResult();
            }

            return(result);
        }
コード例 #2
0
        public override ValidationResult Validate <T>(T request)
        {
            var req = request as GetWorkOrderRequest;

            ValidationResult result;

            result = _requestComponentValidator.RouteId(req.RouteId);

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersionRequired(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersion(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = new ValidationResult();
            }

            return(result);
        }
コード例 #3
0
        public override ValidationResult Validate <T>(T request)
        {
            var req = request as UploadFileRequest;

            ValidationResult result;

            result = _requestComponentValidator.QueryApiVersionRequired(req.QueryApiVersion);

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersion(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = _requestComponentValidator.FileMediaExtension(req.FileExtension);
            }

            if (result == null)
            {
                result = new ValidationResult();
            }

            return(result);
        }
コード例 #4
0
        public override ValidationResult Validate <T>(T request)
        {
            var req = request as UpdateBusinessUnitRequest;

            ValidationResult result;

            result = _requestComponentValidator.RouteId(req.RouteId);

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersionRequired(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersion(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = _requestComponentValidator.HeaderIfMatchRequired(req.HeaderIfMatch);
            }

            if (result == null)
            {
                result = _requestComponentValidator.HeaderIfMatch(req.HeaderIfMatch);
            }

            if (result == null)
            {
                result = _requestComponentValidator.HeaderContentTypeRequired(req.HeaderContentType);
            }

            if (result == null)
            {
                result = _requestComponentValidator.HeaderContentType(req.HeaderContentType);
            }

            if (result == null)
            {
                result = _requestComponentValidator.BodyPatchRequired(req.BodyPatch);
            }

            if (result == null)
            {
                result = _requestComponentValidator.BodyPatch(req.BodyPatch);
            }

            if (result == null)
            {
                result = new ValidationResult();
            }

            return(result);
        }
コード例 #5
0
        public override ValidationResult Validate <T>(T request)
        {
            var req = request as ListProductItemRequest;
            ValidationResult result;

            result = _requestComponentValidator.QueryApiVersionRequired(req.QueryApiVersion);

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersion(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = new ValidationResult();
            }

            return(result);
        }
コード例 #6
0
        public override ValidationResult Validate <T>(T request)
        {
            var req = request as CreateTransportTypeRequest;

            ValidationResult result;

            result = _requestComponentValidator.QueryApiVersionRequired(req.QueryApiVersion);

            if (result == null)
            {
                result = _requestComponentValidator.QueryApiVersion(req.QueryApiVersion);
            }

            if (result == null)
            {
                result = new ValidationResult();
            }

            return(result);
        }