コード例 #1
0
        public Stream GetRequestStreamAsync(int contentLenght)
        {
            var result = new MemoryStream();
            var writer = new StreamWriter(result);
            var b      = new char[contentLenght];

            _reader.ReadBlockAsync(b, 0, contentLenght);
            writer.WriteAsync(b);
            writer.FlushAsync();
            result.Seek(0, SeekOrigin.Begin);
            return(result);
        }