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
46 instantiations of ByteArrayContent
Aspire.Dashboard.Tests (12)
Integration\OtlpHttpServiceTests.cs (11)
42var content = new ByteArrayContent(request.ToByteArray()); 68var content = new ByteArrayContent(request.ToByteArray()); 112var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 136var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 164var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 202var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 229using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 257var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 283using var content = new ByteArrayContent(request.ToByteArray()); 312using var content = new ByteArrayContent(request.ToByteArray()); 341using var content = new ByteArrayContent(request.ToByteArray());
Integration\StartupTests.cs (1)
407using 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)
3617response.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 (7)
DownloadFileTests.cs (4)
59Content = new ByteArrayContent(fileResponseContent) 128Content = new ByteArrayContent(fileResponseContent) 196Content = new ByteArrayContent(TestInputs.ReadAllBytes(Path.Combine("Symbols", _testTextFile))) 201Content = new ByteArrayContent(TestInputs.ReadAllBytes(Path.Combine("Symbols", _testSymbolPackage)))
GeneralTests.cs (3)
122response.Content = new ByteArrayContent(content); 158Content = new ByteArrayContent(responseContent) 162Content = new ByteArrayContent(responseContent)
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimHttpHandler.cs (1)
38ByteArrayContent newContent = new(Encoding.UTF8.GetBytes(actualInput));
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)
1216_sendRequestMessage.Content ??= new ByteArrayContent(Array.Empty<byte>()); 1264_sendRequestTask = SendRequest(async, new ByteArrayContent(buffer.Array!, buffer.Offset, buffer.Count));
22 references to ByteArrayContent
Aspire.Dashboard.Tests (12)
Integration\OtlpHttpServiceTests.cs (11)
42var content = new ByteArrayContent(request.ToByteArray()); 68var content = new ByteArrayContent(request.ToByteArray()); 112var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 136var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 164var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 202var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 229using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 257var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 283using var content = new ByteArrayContent(request.ToByteArray()); 312using var content = new ByteArrayContent(request.ToByteArray()); 341using var content = new ByteArrayContent(request.ToByteArray());
Integration\StartupTests.cs (1)
407using 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);
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimHttpHandler.cs (1)
38ByteArrayContent newContent = new(Encoding.UTF8.GetBytes(actualInput));
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