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
40 instantiations of ByteArrayContent
Aspire.Cli.Tests (8)
Agents\AspireSkillsInstallerTests.cs (8)
217Content = new ByteArrayContent(archiveBytes) 267Content = new ByteArrayContent(archiveBytes) 334Content = new ByteArrayContent(archiveBytes) 1002Content = new ByteArrayContent(archiveBytes) 1612Content = new ByteArrayContent(archiveBytes) 1677Content = new ByteArrayContent(archiveBytes) 1726Content = new ByteArrayContent(malformedArchiveBytes) 1782Content = new ByteArrayContent(archiveBytes)
Aspire.Dashboard.Tests (16)
Integration\OtlpGrpcServiceTests.cs (1)
260Content = new ByteArrayContent([])
Integration\OtlpHttpServiceTests.cs (13)
50var content = new ByteArrayContent(request.ToByteArray()); 76var content = new ByteArrayContent(request.ToByteArray()); 126var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 198Content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()) 224var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 252var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 290var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 317using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 348using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 395var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 421using var content = new ByteArrayContent(request.ToByteArray()); 450using var content = new ByteArrayContent(request.ToByteArray()); 479using var content = new ByteArrayContent(request.ToByteArray());
Integration\Playwright\NativeAotDashboardTests.cs (1)
154using 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.Extensions.AI.OpenAI.Tests (3)
OpenAIHostedFileClientTests.cs (3)
573? new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(fileData) } 607? new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(fileData) } 702? new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(fileData) }
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
37Content = new ByteArrayContent(data.Array, data.Offset, data.Count) 52Content = new ByteArrayContent(Array.Empty<byte>()),
Microsoft.NET.Build.Containers (1)
Registry\Registry.cs (1)
515ByteArrayContent 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>());
19 references to ByteArrayContent
Aspire.Dashboard.Tests (14)
Integration\OtlpHttpServiceTests.cs (12)
50var content = new ByteArrayContent(request.ToByteArray()); 76var content = new ByteArrayContent(request.ToByteArray()); 126var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 224var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 252var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 290var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 317using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 348using var content = new ByteArrayContent(Encoding.UTF8.GetBytes("{}")); 395var content = new ByteArrayContent(new ExportLogsServiceRequest().ToByteArray()); 421using var content = new ByteArrayContent(request.ToByteArray()); 450using var content = new ByteArrayContent(request.ToByteArray()); 479using var content = new ByteArrayContent(request.ToByteArray());
Integration\Playwright\NativeAotDashboardTests.cs (1)
154using 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)
515ByteArrayContent 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