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
27 instantiations of ByteArrayContent
Aspire.Dashboard.Tests (16)
Integration\McpServiceTests.cs (3)
326var content = new ByteArrayContent(Encoding.UTF8.GetBytes(json)); 360var notificationContent = new ByteArrayContent(Encoding.UTF8.GetBytes(notificationJson)); 387var content = new ByteArrayContent(Encoding.UTF8.GetBytes(json));
Integration\OtlpHttpServiceTests.cs (12)
46var content = new ByteArrayContent(request.ToByteArray()); 72var content = new ByteArrayContent(request.ToByteArray()); 116var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 140var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 168var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 206var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 233using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 264using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 311var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 337using var content = new ByteArrayContent(request.ToByteArray()); 366using var content = new ByteArrayContent(request.ToByteArray()); 395using var content = new ByteArrayContent(request.ToByteArray());
Integration\StartupTests.cs (1)
528using 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>());
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimHttpHandler.cs (1)
57ByteArrayContent newContent = new(Encoding.UTF8.GetBytes(actualInput));
Microsoft.NET.Build.Containers (1)
Registry\Registry.cs (1)
492ByteArrayContent content = new(chunkBackingStore, offset: 0, count: bytesRead);
System.Net.Requests (2)
System\Net\HttpWebRequest.cs (2)
1226_sendRequestMessage.Content ??= new ByteArrayContent(Array.Empty<byte>()); 1274_sendRequestTask = SendRequest(async, new ByteArrayContent(buffer.Array!, buffer.Offset, buffer.Count));
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
29httpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
21 references to ByteArrayContent
Aspire.Dashboard.Tests (16)
Integration\McpServiceTests.cs (3)
326var content = new ByteArrayContent(Encoding.UTF8.GetBytes(json)); 360var notificationContent = new ByteArrayContent(Encoding.UTF8.GetBytes(notificationJson)); 387var content = new ByteArrayContent(Encoding.UTF8.GetBytes(json));
Integration\OtlpHttpServiceTests.cs (12)
46var content = new ByteArrayContent(request.ToByteArray()); 72var content = new ByteArrayContent(request.ToByteArray()); 116var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 140var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 168var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 206var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 233using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 264using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 311var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 337using var content = new ByteArrayContent(request.ToByteArray()); 366using var content = new ByteArrayContent(request.ToByteArray()); 395using var content = new ByteArrayContent(request.ToByteArray());
Integration\StartupTests.cs (1)
528using var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray());
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimHttpHandler.cs (1)
57ByteArrayContent newContent = new(Encoding.UTF8.GetBytes(actualInput));
Microsoft.NET.Build.Containers (1)
Registry\Registry.cs (1)
492ByteArrayContent content = new(chunkBackingStore, offset: 0, count: bytesRead);
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