29 instantiations of StreamContent
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
263var fileContent = new StreamContent(stream);
AuthSamples.FunctionalTests (1)
HttpClientExtensions.cs (1)
49Content = new StreamContent(submit.Body)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Extensions\HttpClientExtensions.cs (1)
51Content = new StreamContent(submit.Body)
Microsoft.AspNetCore.Mvc.Testing (2)
Handlers\RedirectHandler.cs (2)
75var contentCopy = new StreamContent(copy); 76request.Content = new StreamContent(originalBody);
Microsoft.AspNetCore.SignalR.Client.Tests (9)
HttpConnectionTests.Transport.cs (2)
493return Task.FromResult(ResponseUtils.CreateResponse(HttpStatusCode.OK, new StreamContent(stream))); 536return Task.FromResult(ResponseUtils.CreateResponse(HttpStatusCode.OK, new StreamContent(stream)));
ServerSentEventsTransportTests.cs (7)
44return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 91return Task.FromResult(new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }); 144return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 197return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 250return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 325return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 478return new HttpResponseMessage { Content = new StreamContent(new OneAtATimeStream(messageParts)) };
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
140var streamContent = new StreamContent(request.Body);
Microsoft.AspNetCore.TestHost (2)
ClientHandler.cs (1)
217response.Content = new StreamContent(httpContext.Response.Body);
RequestBuilder.cs (1)
56_req.Content = new StreamContent(Stream.Null);
Microsoft.AspNetCore.TestHost.Tests (1)
TestServerTests.cs (1)
225var response = await server.CreateClient().PostAsync("/", new StreamContent(stream));
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpResponseBodyReader.cs (1)
111var newContent = new StreamContent(freshStream);
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 (7)
Logging\HttpClientLoggerTest.cs (2)
859using var requestContent = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(requestInput)))); 870using 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 (2)
60Content = new StreamContent(new MemoryStream()) 154Content = 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())
12 references to StreamContent
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
263var fileContent = new StreamContent(stream);
Microsoft.AspNetCore.Mvc.Testing (1)
Handlers\RedirectHandler.cs (1)
75var contentCopy = new StreamContent(copy);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
140var streamContent = new StreamContent(request.Body);
Microsoft.AspNetCore.TestHost (1)
ClientHandler.cs (1)
88if (requestContent is StreamContent)
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpResponseBodyReader.cs (1)
111var newContent = new StreamContent(freshStream);
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (2)
859using var requestContent = new StreamContent(new NotSeekableStream(new(Encoding.UTF8.GetBytes(requestInput)))); 870using 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.");
netstandard (1)
netstandard.cs (1)
1137[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.StreamContent))]
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