Use ReadOnlyMemory<byte> for binary data to eliminate UTF-16 transcoding (#1070)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> Co-authored-by: ericstj <8918108+ericstj@users.noreply.github.com> Co-authored-by: Eric StJohn <ericstj@microsoft.com>
This commit is contained in:
parent
a3ce9e9606
commit
80b1ad21d7
1 changed files with 400 additions and 103 deletions
|
|
@ -36,7 +36,7 @@ public class ConformanceTools
|
|||
{
|
||||
return new ImageContentBlock
|
||||
{
|
||||
Data = TestImageBase64,
|
||||
Data = System.Text.Encoding.UTF8.GetBytes(TestImageBase64),
|
||||
MimeType = "image/png"
|
||||
};
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ public class ConformanceTools
|
|||
{
|
||||
return new AudioContentBlock
|
||||
{
|
||||
Data = TestAudioBase64,
|
||||
Data = System.Text.Encoding.UTF8.GetBytes(TestAudioBase64),
|
||||
MimeType = "audio/wav"
|
||||
};
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ public class ConformanceTools
|
|||
return
|
||||
[
|
||||
new TextContentBlock { Text = "Multiple content types test:" },
|
||||
new ImageContentBlock { Data = TestImageBase64, MimeType = "image/png" },
|
||||
new ImageContentBlock { Data = System.Text.Encoding.UTF8.GetBytes(TestImageBase64), MimeType = "image/png" },
|
||||
new EmbeddedResourceBlock
|
||||
{
|
||||
Resource = new TextResourceContents
|
||||
|
|
|
|||
Loading…
Reference in a new issue