System\Data\Services\Client\DataServiceContext.cs (18)
4349if (null == contentStream || null == contentStream.Stream)
4357httpWebRequest.ContentLength = contentStream.Stream.Length - contentStream.Stream.Position;
4372if (null != contentStream && null != contentStream.Stream)
4376httpWebRequest.ContentLength = contentStream.Stream.Length - contentStream.Stream.Position;
4385read = contentStream.Stream.Read(buffer, 0, buffer.Length);
5154stream = contentStream.Stream as MemoryStream;
5723Util.NullCheck(contentStream.Stream, InternalError.InvalidEndGetRequestStreamContent);
5726MemoryStream memoryStream = contentStream.Stream as MemoryStream;
5754asyncResult = BaseAsyncResult.InvokeAsync(contentStream.Stream.BeginRead, pereq.RequestContentBuffer, 0, pereq.RequestContentBuffer.Length, this.AsyncRequestContentEndRead, pereq);
5787Util.NullCheck(contentStream.Stream, InternalError.InvalidEndReadStream);
5791int count = contentStream.Stream.EndRead(asyncResult);
5814asyncResult = BaseAsyncResult.InvokeAsync(contentStream.Stream.BeginRead, pereq.RequestContentBuffer, 0, pereq.RequestContentBuffer.Length, this.AsyncRequestContentEndRead, pereq);
5868Util.NullCheck(contentStream.Stream, InternalError.InvalidEndWriteStream);
5882asyncResult = BaseAsyncResult.InvokeAsync(contentStream.Stream.BeginRead, pereq.RequestContentBuffer, 0, pereq.RequestContentBuffer.Length, this.AsyncRequestContentEndRead, pereq);
6225if (this.RequestContentStream.Stream != null && this.RequestContentStream.IsKnownMemoryStream)
6227this.RequestContentStream.Stream.Dispose();