44 writes to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (12)
Contents\AIContentTests.cs (2)
27c.RawRepresentation = raw; 41RawRepresentation = new object(),
Contents\CodeInterpreterToolCallContentTests.cs (1)
38c.RawRepresentation = raw;
Contents\CodeInterpreterToolResultContentTests.cs (1)
38c.RawRepresentation = raw;
Contents\FunctionCallContentTests.cs (1)
55c.RawRepresentation = raw;
Contents\FunctionResultContentTests.cs (1)
41c.RawRepresentation = raw;
Contents\HostedFileContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\HostedVectorStoreContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\McpServerToolCallContentTests.cs (1)
33c.RawRepresentation = raw;
Contents\McpServerToolResultContentTests.cs (1)
30c.RawRepresentation = raw;
Contents\TextContentTests.cs (1)
30c.RawRepresentation = raw;
Contents\TextReasoningContentTests.cs (1)
31c.RawRepresentation = raw;
Microsoft.Extensions.AI.OpenAI (28)
MicrosoftExtensionsAIChatExtensions.cs (2)
194fcc.RawRepresentation = toolCall; 222RawRepresentation = tcm,
OpenAIAssistantsChatClient.cs (3)
192fcc.RawRepresentation = ru; 206RawRepresentation = details, 224RawRepresentation = details,
OpenAIChatClient.cs (5)
370RawRepresentation = audioUpdate, 405RawRepresentation = tokenUsage, 488RawRepresentation = audio, 498callContent.RawRepresentation = toolCall; 738aiContent.RawRepresentation = contentPart;
OpenAIResponsesChatClient.cs (18)
191RawRepresentation = outputItem, 197fcc.RawRepresentation = outputItem; 202message.Contents.Add(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem }); 213RawRepresentation = mtcari, 216RawRepresentation = mtcari, 221message.Contents.Add(new McpServerToolApprovalResponseContent(mtcari.ApprovalRequestId, mtcari.Approved) { RawRepresentation = mtcari }); 233message.Contents.Add(new() { RawRepresentation = outputItem }); 405RawRepresentation = imageGenInProgress, 431RawRepresentation = mtcari, 434RawRepresentation = mtcari, 466yield return CreateUpdate(new AIContent { RawRepresentation = outputItemDoneUpdate.Item }); 1249content.RawRepresentation = part; 1312RawRepresentation = mtci, 1347CodeInterpreterCallImageOutput cicio => new UriContent(cicio.ImageUri, OpenAIClientExtensions.ImageUriToMediaType(cicio.ImageUri)) { RawRepresentation = cicio }, 1348CodeInterpreterCallLogsOutput ciclo => new TextContent(ciclo.Logs) { RawRepresentation = ciclo }, 1351RawRepresentation = cicri, 1368RawRepresentation = outputItem, 1381RawRepresentation = update,
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (4)
721new AIContent { RawRepresentation = ResponseItem.CreateWebSearchCallItem() }, 722new AIContent { RawRepresentation = ResponseItem.CreateReferenceItem("123") }, 729new AIContent { RawRepresentation = ResponseItem.CreateReasoningItem("text") }, 733new AIContent { RawRepresentation = ResponseItem.CreateSystemMessageItem("test") },
53 references to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (39)
Contents\AIContentTests.cs (5)
16Assert.Null(c.RawRepresentation); 25Assert.Null(c.RawRepresentation); 28Assert.Same(raw, c.RawRepresentation); 45Assert.NotNull(original.RawRepresentation); 53Assert.Null(deserialized.RawRepresentation);
Contents\CodeInterpreterToolCallContentTests.cs (3)
16Assert.Null(c.RawRepresentation); 36Assert.Null(c.RawRepresentation); 39Assert.Same(raw, c.RawRepresentation);
Contents\CodeInterpreterToolResultContentTests.cs (3)
16Assert.Null(c.RawRepresentation); 36Assert.Null(c.RawRepresentation); 39Assert.Same(raw, c.RawRepresentation);
Contents\FunctionCallContentTests.cs (4)
23Assert.Null(c.RawRepresentation); 40Assert.Null(c.RawRepresentation); 53Assert.Null(c.RawRepresentation); 56Assert.Same(raw, c.RawRepresentation);
Contents\FunctionResultContentTests.cs (4)
17Assert.Null(c.RawRepresentation); 27Assert.Null(c.RawRepresentation); 39Assert.Null(c.RawRepresentation); 42Assert.Same(raw, c.RawRepresentation);
Contents\HostedFileContentTests.cs (3)
25Assert.Null(c.RawRepresentation); 43Assert.Null(c.RawRepresentation); 46Assert.Same(raw, c.RawRepresentation);
Contents\HostedVectorStoreContentTests.cs (3)
24Assert.Null(c.RawRepresentation); 43Assert.Null(c.RawRepresentation); 46Assert.Same(raw, c.RawRepresentation);
Contents\McpServerToolCallContentTests.cs (3)
17Assert.Null(c.RawRepresentation); 31Assert.Null(c.RawRepresentation); 34Assert.Same(raw, c.RawRepresentation);
Contents\McpServerToolResultContentTests.cs (3)
18Assert.Null(c.RawRepresentation); 28Assert.Null(c.RawRepresentation); 31Assert.Same(raw, c.RawRepresentation);
Contents\TextContentTests.cs (3)
18Assert.Null(c.RawRepresentation); 28Assert.Null(c.RawRepresentation); 31Assert.Same(raw, c.RawRepresentation);
Contents\TextReasoningContentTests.cs (3)
18Assert.Null(c.RawRepresentation); 29Assert.Null(c.RawRepresentation); 32Assert.Same(raw, c.RawRepresentation);
Contents\UsageContentTests.cs (2)
22Assert.Null(c.RawRepresentation); 39Assert.Null(c.RawRepresentation);
Microsoft.Extensions.AI.OpenAI (7)
OpenAIAssistantsChatClient.cs (1)
533case AIContent when content.RawRepresentation is MessageContent rawRep:
OpenAIChatClient.cs (2)
250if (content.RawRepresentation is ChatMessageContentPart raw) 275case AIContent when content.RawRepresentation is ChatMessageContentPart rawContentPart:
OpenAIResponsesChatClient.cs (4)
854{ RawRepresentation: ResponseItem rawRep } => rawRep, 878case AIContent when item.RawRepresentation is ResponseContentPart rawRep: 933case AIContent when item.RawRepresentation is ResponseItem rawRep: 1067case AIContent when item.RawRepresentation is ResponseItem rawRep:
Microsoft.Extensions.AI.OpenAI.Tests (7)
OpenAIConversionTests.cs (4)
741Assert.Same(messages[0].Contents[1].RawRepresentation, items[1]); 742Assert.Same(messages[0].Contents[2].RawRepresentation, items[2]); 746Assert.Same(messages[1].Contents[1].RawRepresentation, items[5]); 747Assert.Same(messages[2].Contents[0].RawRepresentation, items[6]);
OpenAIResponseClientTests.cs (3)
720Assert.NotNull(computerUserItem.RawRepresentation); 721Assert.IsType<ComputerCallResponseItem>(computerUserItem.RawRepresentation); 817var ccri = Assert.IsType<ComputerCallResponseItem>(content.RawRepresentation);