1 type derived from StreamContent
NuGet.Protocol (1)
HttpSource\DownloadTimeoutStreamContent.cs (1)
16public class DownloadTimeoutStreamContent : StreamContent
22 instantiations of StreamContent
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpResponseBodyReader.cs (1)
118var newContent = new StreamContent(pipe.Reader.AsStream());
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
NoRemoteCallHandler.cs (1)
41Content = new StreamContent(new MemoryStream(_data, writable: false))
NoRemoteCallNotSeekableHandler.cs (1)
44Content = new StreamContent(new NotSeekableStream(new MemoryStream(_data)))
Microsoft.Extensions.Http.Diagnostics.Tests (10)
Logging\HttpClientLoggerTest.cs (2)
865using var requestContent = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(requestInput)))); 876using var responseContent = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(responseInput))));
Logging\HttpRequestBodyReaderTest.cs (2)
61Content = new StreamContent(new MemoryStream()), 185Content = new StreamContent(streamMock.Object),
Logging\HttpResponseBodyReaderTest.cs (5)
68Content = new StreamContent(new MemoryStream()) 155Content = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(bigContent)))) 182Content = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(bigContent)))) 222Content = new StreamContent(streamMock.Object) 251Content = new StreamContent(streamMock.Object)
Logging\Internal\NoRemoteCallHandler.cs (1)
35Content = new StreamContent(new MemoryStream(_fileContent))
Microsoft.Extensions.Http.Resilience.Tests (1)
Resilience\RequestMessageSnapshotTests.cs (1)
25Content = new StreamContent(new MemoryStream())
Microsoft.NET.Build.Containers (1)
Registry\DefaultBlobUploadOperations.cs (1)
77StreamContent httpContent = new(content);
Microsoft.NET.Sdk.Publish.Tasks (4)
Kudu\KuduVfsDeploy.cs (1)
61using (var content = new StreamContent(File.OpenRead(file)))
Kudu\KuduZipDeploy.cs (1)
52using (var content = new StreamContent(File.OpenRead(zipFilePath)))
Tasks\Http\HttpClientExtensions.cs (2)
55StreamContent content = new(messageBody ?? new MemoryStream()) 112StreamContent content = new(messageBody ?? new MemoryStream())
NuGet.Protocol (2)
HttpSource\HttpRetryHandler.cs (1)
184var newContent = new StreamContent(diagnosticsStream);
Resources\PackageUpdateResource.cs (1)
658var packageContent = new StreamContent(fileStream);
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
153using var content = new StreamContent(zipStream);
21 references to StreamContent
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpResponseBodyReader.cs (1)
118var newContent = new StreamContent(pipe.Reader.AsStream());
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (2)
865using var requestContent = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(requestInput)))); 876using var responseContent = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(responseInput))));
Microsoft.Extensions.Http.Resilience (2)
Internal\RequestMessageSnapshot.cs (2)
76if (request.Content is StreamContent) 78Throw.InvalidOperationException($"{nameof(StreamContent)} content cannot by cloned.");
Microsoft.NET.Build.Containers (1)
Registry\DefaultBlobUploadOperations.cs (1)
77StreamContent httpContent = new(content);
Microsoft.NET.Sdk.Publish.Tasks (8)
Kudu\KuduVfsDeploy.cs (1)
61using (var content = new StreamContent(File.OpenRead(file)))
Kudu\KuduZipDeploy.cs (1)
52using (var content = new StreamContent(File.OpenRead(zipFilePath)))
Tasks\Http\DefaultHttpClient.cs (2)
20public Task<HttpResponseMessage> PostAsync(Uri uri, StreamContent content) 32public Task<HttpResponseMessage> PutAsync(Uri uri, StreamContent content, CancellationToken cancellationToken)
Tasks\Http\HttpClientExtensions.cs (2)
55StreamContent content = new(messageBody ?? new MemoryStream()) 112StreamContent content = new(messageBody ?? new MemoryStream())
Tasks\Http\IHttpClient.cs (2)
25Task<HttpResponseMessage> PostAsync(Uri uri, StreamContent content); 42Task<HttpResponseMessage> PutAsync(Uri uri, StreamContent content, CancellationToken cancellationToken);
netstandard (1)
netstandard.cs (1)
1137[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.StreamContent))]
NuGet.Protocol (3)
HttpSource\DownloadTimeoutStreamContent.cs (1)
11/// A wrapper around <see cref="StreamContent"/> that applies a <see cref="DownloadTimeoutStream"/>
HttpSource\HttpRetryHandler.cs (1)
184var newContent = new StreamContent(diagnosticsStream);
Resources\PackageUpdateResource.cs (1)
658var packageContent = new StreamContent(fileStream);
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
153using var content = new StreamContent(zipStream);
System.Net.Http (2)
System\Net\Http\StreamContent.cs (2)
62GetType() == typeof(StreamContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 114GetType() == typeof(StreamContent) ? new ReadOnlyStream(_content) : // type check ensures we use possible derived type's CreateContentReadStreamAsync override