Exemplo n.º 1
0
        public void PostFileWithRequest <TRequest>(
            Stream contentToUpload,
            string uploadedFileName,
            TRequest requestDto,
            HttpContent extraContent = null,
            string extraContentName  = null) where TRequest : IReturnVoid
        {
            var fileUploader = FileUploader.Create(_client);

            InvokeWebServiceMethod(() => fileUploader.PostFileWithRequest(
                                       GetPostUrl(requestDto),
                                       contentToUpload,
                                       uploadedFileName,
                                       requestDto,
                                       extraContent,
                                       extraContentName));

            LocationResponseHeader = fileUploader.LocationResponseHeader;
        }
Exemplo n.º 2
0
        public TResponse PostFileWithRequest <TResponse>(
            Stream contentToUpload,
            string uploadedFileName,
            IReturn <TResponse> requestDto,
            HttpContent extraContent = null,
            string extraContentName  = null)
        {
            var fileUploader = FileUploader.Create(_client);

            var response = InvokeWebServiceMethod(() => fileUploader.PostFileWithRequest(
                                                      GetPostUrl(requestDto),
                                                      contentToUpload,
                                                      uploadedFileName,
                                                      requestDto,
                                                      extraContent,
                                                      extraContentName));

            LocationResponseHeader = fileUploader.LocationResponseHeader;

            return(response);
        }
Exemplo n.º 3
0
        public TResponse PostFileWithRequest <TResponse>(Stream contentToUpload, string uploadedFileName, IReturn <TResponse> requestDto)
        {
            var fileUploader = FileUploader.Create(_client);

            return(InvokeWebServiceMethod(() => fileUploader.PostFileWithRequest(GetPostUrl(requestDto), contentToUpload, uploadedFileName, requestDto)));
        }