2 types derived from ByteArrayContent
System.Net.Http (2)
System\Net\Http\FormUrlEncodedContent.cs (1)
13public class FormUrlEncodedContent : ByteArrayContent
System\Net\Http\StringContent.cs (1)
14public class StringContent : ByteArrayContent
54 instantiations of ByteArrayContent
Aspire.Dashboard.Tests (12)
Integration\OtlpHttpServiceTests.cs (11)
43var content = new ByteArrayContent(request.ToByteArray()); 69var content = new ByteArrayContent(request.ToByteArray()); 113var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 137var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 165var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 203var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 230using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 258var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 284using var content = new ByteArrayContent(request.ToByteArray()); 313using var content = new ByteArrayContent(request.ToByteArray()); 342using var content = new ByteArrayContent(request.ToByteArray());
Integration\StartupTests.cs (1)
404using var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray());
dotnet-svcutil-lib (6)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (1)
74httpRequestMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (2)
343HttpContent newContent = new ByteArrayContent(Array.Empty<byte>()); 354this.HttpRequestMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
35httpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (2)
367HttpContent newContent = new ByteArrayContent(Array.Empty<byte>()); 378this.HttpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
Interop.FunctionalTests (2)
Http3\Http3RequestTests.cs (1)
1370request.Content = new ByteArrayContent(TestData);
HttpClientHttp2InteropTests.cs (1)
1330var response = await client.PostAsync(url, new ByteArrayContent(new byte[1024 * 18])).DefaultTimeout();
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3613response.Content = new ByteArrayContent(_stream.ToArray());
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
InputFormatterTests.cs (4)
226var content = new ByteArrayContent(Array.Empty<byte>()); 271var content = new ByteArrayContent(Array.Empty<byte>()); 286var content = new ByteArrayContent(Array.Empty<byte>()); 301var content = new ByteArrayContent(Array.Empty<byte>());
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
240request.Content = new ByteArrayContent(compressedBytes); 311request.Content = new ByteArrayContent(compressedBytes); 387request.Content = new ByteArrayContent(compressedBytes); 489request.Content = new ByteArrayContent(compressedBytes); 573request.Content = new ByteArrayContent(compressedBytes); 724request.Content = new ByteArrayContent(compressedContent);
Microsoft.AspNetCore.SignalR.Client.Tests (1)
ResponseUtils.cs (1)
24CreateResponse(statusCode, new ByteArrayContent(payload));
Microsoft.AspNetCore.TestHost.Tests (2)
ClientHandlerTests.cs (2)
139var content = new ByteArrayContent(contentBytes); 192var content = new ByteArrayContent(contentBytes);
Microsoft.DotNet.Build.Tasks.Feed.Tests (16)
GeneralTests.cs (3)
122response.Content = new ByteArrayContent(content); 158Content = new ByteArrayContent(responseContent) 162Content = new ByteArrayContent(responseContent)
PublishToSymbolServerTest.cs (13)
241Content = new ByteArrayContent(responseContent) 278Content = new ByteArrayContent(responseContent) 282Content = new ByteArrayContent(responseContent) 286Content = new ByteArrayContent(responseContent) 321Content = new ByteArrayContent(responseContent) 325Content = new ByteArrayContent(responseContent) 329Content = new ByteArrayContent(responseContent) 364Content = new ByteArrayContent(responseContent) 368Content = new ByteArrayContent(responseContent) 400Content = new ByteArrayContent(responseContent) 429Content = new ByteArrayContent(responseContent) 433Content = new ByteArrayContent(responseContent) 437Content = new ByteArrayContent(responseContent)
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
37Content = new ByteArrayContent(data.Array, data.Offset, data.Count) 52Content = new ByteArrayContent(Array.Empty<byte>()),
System.Net.Requests (2)
System\Net\HttpWebRequest.cs (2)
1200_sendRequestMessage.Content ??= new ByteArrayContent(Array.Empty<byte>()); 1248_sendRequestTask = SendRequest(async, new ByteArrayContent(buffer.Array!, buffer.Offset, buffer.Count));
21 references to ByteArrayContent
Aspire.Dashboard.Tests (12)
Integration\OtlpHttpServiceTests.cs (11)
43var content = new ByteArrayContent(request.ToByteArray()); 69var content = new ByteArrayContent(request.ToByteArray()); 113var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 137var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 165var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 203var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 230using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 258var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 284using var content = new ByteArrayContent(request.ToByteArray()); 313using var content = new ByteArrayContent(request.ToByteArray()); 342using var content = new ByteArrayContent(request.ToByteArray());
Integration\StartupTests.cs (1)
404using var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray());
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
InputFormatterTests.cs (4)
226var content = new ByteArrayContent(Array.Empty<byte>()); 271var content = new ByteArrayContent(Array.Empty<byte>()); 286var content = new ByteArrayContent(Array.Empty<byte>()); 301var content = new ByteArrayContent(Array.Empty<byte>());
Microsoft.AspNetCore.TestHost.Tests (2)
ClientHandlerTests.cs (2)
139var content = new ByteArrayContent(contentBytes); 192var content = new ByteArrayContent(contentBytes);
netstandard (1)
netstandard.cs (1)
1094[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.ByteArrayContent))]
System.Net.Http (2)
System\Net\Http\ByteArrayContent.cs (2)
49GetType() == typeof(ByteArrayContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 68GetType() == typeof(ByteArrayContent) ? CreateMemoryStreamForByteArray() : // type check ensures we use possible derived type's CreateContentReadStreamAsync override