コード例 #1
0
        /// <summary>
        /// Ends the request and creates the response object.
        /// </summary>
        /// <returns>The response object for this request.</returns>
        internal DataServiceStreamResponse End()
        {
            if (this.responseMessage != null)
            {
                // update the etag if the response contains the etag
                this.streamDescriptor.ETag = this.responseMessage.GetHeader(XmlConstants.HttpResponseETag);

                // update the content type of the stream for named stream.
                this.streamDescriptor.ContentType = this.responseMessage.GetHeader(XmlConstants.HttpContentType);

                DataServiceStreamResponse streamResponse = new DataServiceStreamResponse(this.responseMessage);
                return(streamResponse);
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
        /// <summary>
        /// Ends the request and creates the response object.
        /// </summary>
        /// <returns>The response object for this request.</returns>
        internal DataServiceStreamResponse End()
        {
            if (this.responseMessage != null)
            {
                // update the etag if the response contains the etag
                this.streamDescriptor.ETag = this.responseMessage.GetHeader(XmlConstants.HttpResponseETag);

                // update the content type of the stream for named stream.
                this.streamDescriptor.ContentType = this.responseMessage.GetHeader(XmlConstants.HttpContentType);

                DataServiceStreamResponse streamResponse = new DataServiceStreamResponse(this.responseMessage);
                return streamResponse;
            }
            else
            {
                return null;
            }
        }