50 writes to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (14)
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)
56c.RawRepresentation = raw;
Contents\FunctionResultContentTests.cs (1)
41c.RawRepresentation = raw;
Contents\HostedFileContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\HostedVectorStoreContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\ImageGenerationToolCallContentTests.cs (1)
31c.RawRepresentation = raw;
Contents\ImageGenerationToolResultContentTests.cs (1)
38c.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 (30)
MicrosoftExtensionsAIChatExtensions.cs (2)
199fcc.RawRepresentation = toolCall; 229RawRepresentation = tcm,
OpenAIAssistantsChatClient.cs (3)
195fcc.RawRepresentation = ru; 209RawRepresentation = details, 227RawRepresentation = details,
OpenAIChatClient.cs (5)
392RawRepresentation = audioUpdate, 427RawRepresentation = tokenUsage, 519RawRepresentation = audio, 529callContent.RawRepresentation = toolCall; 797aiContent.RawRepresentation = contentPart;
OpenAIResponsesChatClient.cs (20)
196RawRepresentation = outputItem, 202fcc.RawRepresentation = outputItem; 207message.Contents.Add(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem }); 218RawRepresentation = mtcari, 221RawRepresentation = mtcari, 226message.Contents.Add(new McpServerToolApprovalResponseContent(mtcari.ApprovalRequestId, mtcari.Approved) { RawRepresentation = mtcari }); 248message.Contents.Add(new() { RawRepresentation = outputItem }); 422RawRepresentation = imageGenInProgress, 435RawRepresentation = codeInterpreterDeltaUpdate, 457RawRepresentation = mtcari, 460RawRepresentation = mtcari, 466yield return CreateUpdate(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem }); 506yield return CreateUpdate(new AIContent { RawRepresentation = outputItemDoneUpdate.Item }); 1326content.RawRepresentation = part; 1389RawRepresentation = mtci, 1413CodeInterpreterCallImageOutput cicio => new UriContent(cicio.ImageUri, OpenAIClientExtensions.ImageUriToMediaType(cicio.ImageUri)) { RawRepresentation = cicio }, 1414CodeInterpreterCallLogsOutput ciclo => new TextContent(ciclo.Logs) { RawRepresentation = ciclo }, 1417RawRepresentation = cicri, 1433RawRepresentation = outputItem, 1446RawRepresentation = update,
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (4)
766new AIContent { RawRepresentation = ResponseItem.CreateWebSearchCallItem() }, 767new AIContent { RawRepresentation = ResponseItem.CreateReferenceItem("123") }, 774new AIContent { RawRepresentation = ResponseItem.CreateReasoningItem("text") }, 778new AIContent { RawRepresentation = ResponseItem.CreateSystemMessageItem("test") },
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
408RawRepresentation = "CustomRaw" 2324RawRepresentation = fcc.RawRepresentation
65 references to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (45)
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); 41Assert.Null(c.RawRepresentation); 54Assert.Null(c.RawRepresentation); 57Assert.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\ImageGenerationToolCallContentTests.cs (3)
15Assert.Null(c.RawRepresentation); 29Assert.Null(c.RawRepresentation); 32Assert.Same(raw, c.RawRepresentation);
Contents\ImageGenerationToolResultContentTests.cs (3)
16Assert.Null(c.RawRepresentation); 36Assert.Null(c.RawRepresentation); 39Assert.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)
536case AIContent when content.RawRepresentation is MessageContent rawRep:
OpenAIChatClient.cs (2)
262if (content.RawRepresentation is ChatMessageContentPart raw) 287case AIContent when content.RawRepresentation is ChatMessageContentPart rawContentPart:
OpenAIResponsesChatClient.cs (4)
931{ RawRepresentation: ResponseItem rawRep } => rawRep, 955case AIContent when item.RawRepresentation is ResponseContentPart rawRep: 1010case AIContent when item.RawRepresentation is ResponseItem rawRep: 1144case AIContent when item.RawRepresentation is ResponseItem rawRep:
Microsoft.Extensions.AI.OpenAI.Tests (11)
OpenAIConversionTests.cs (4)
786Assert.Same(messages[0].Contents[1].RawRepresentation, items[1]); 787Assert.Same(messages[0].Contents[2].RawRepresentation, items[2]); 791Assert.Same(messages[1].Contents[1].RawRepresentation, items[5]); 792Assert.Same(messages[2].Contents[0].RawRepresentation, items[6]);
OpenAIResponseClientIntegrationTests.cs (3)
593Assert.NotNull(reasoningContent.RawRepresentation); 613Assert.Null(deserializedReasoning.RawRepresentation); 693Assert.Null(deserializedReasoning.RawRepresentation);
OpenAIResponseClientTests.cs (4)
825Assert.NotNull(computerUserItem.RawRepresentation); 827Assert.IsType<ComputerCallResponseItem>(computerUserItem.RawRepresentation); 927var ccri = Assert.IsType<ComputerCallResponseItem>(content.RawRepresentation); 5442Assert.IsType<FunctionCallOutputResponseItem>(frc.RawRepresentation);
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
434Assert.Equal("CustomRaw", capturedFrc.RawRepresentation); 2324RawRepresentation = fcc.RawRepresentation