196 instantiations of DataContent
Microsoft.Extensions.AI.Abstractions (5)
Microsoft.Extensions.AI.Abstractions.Tests (110)
ChatCompletion\ChatMessageTests.cs (4)
146new DataContent("data:text/image;base64,aGVsbG8="),
147new DataContent("data:text/plain;base64,aGVsbG8="),
259new DataContent(new Uri("data:text/plain;base64,aGVsbG8="), "mime-type/2")
263new DataContent(new BinaryData(new[] { 1, 2, 3 }, options: TestJsonSerializerContext.Default.Options), "mime-type/3")
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (8)
662updates.Add(new() { Contents = [new DataContent("data:image/png;base64,aGVsbG8=")] });
923var image1 = new DataContent((byte[])[1, 2, 3, 4], "image/png") { Name = "image1.png" };
924var image2 = new DataContent((byte[])[5, 6, 7, 8], "image/jpeg") { Name = "image2.jpg" };
925var image3 = new DataContent((byte[])[9, 10, 11, 12], "image/png") { Name = "image3.png" };
926var image4 = new DataContent((byte[])[13, 14, 15, 16], "image/gif") { Name = "image4.gif" };
981var image1 = new DataContent((byte[])[1, 2, 3, 4], "image/png") { Name = "image1.png" };
982var image2 = new DataContent((byte[])[5, 6, 7, 8], "image/jpeg") { Name = "image2.jpg" };
983var image3 = new DataContent((byte[])[9, 10, 11, 12], "image/png") { Name = "image3.png" };
ChatCompletion\ChatResponseUpdateTests.cs (6)
92new DataContent("data:image/audio;base64,aGVsbG8="),
93new DataContent("data:image/image;base64,aGVsbG8="),
122new DataContent("data:image/png;base64,aGVsbG8="),
124new DataContent("data"u8.ToArray(), "text/plain"),
185new DataContent("data:image/png;base64,aGVsbG8="),
187new DataContent("data"u8.ToArray(), "text/plain"),
Contents\DataContentTests.cs (37)
49Assert.Throws(exception, () => new DataContent(path));
61Assert.Throws<ArgumentException>("mediaType", () => new DataContent("data:image/png;base64,aGVsbG8=", type));
71var content = new DataContent("data:image/png;base64,aGVsbG8=", mediaType);
75content = new DataContent("data:,", mediaType);
79content = new DataContent("data:text/plain,", mediaType);
83content = new DataContent(new Uri("data:text/plain,"), mediaType);
87content = new DataContent(new byte[] { 0, 1, 2 }, mediaType);
91content = new DataContent(content.Uri);
101content = new DataContent("data:image/png;base64,aGVsbG8=");
106content = new DataContent(new Uri("data:image/png;base64,aGVsbG8="));
127Validate(new DataContent(uri), expectedData);
128Validate(new DataContent(new Uri(uri)), expectedData);
137var content = new DataContent(uri, mediaType);
147new DataContent(uri: "data:application/octet-stream;base64,AQIDBA=="),
153new DataContent(new ReadOnlyMemory<byte>([0x01, 0x02, 0x03, 0x04]), "application/octet-stream"),
159new DataContent(new ReadOnlyMemory<byte>([0x01, 0x02, 0x03, 0x04]), "application/octet-stream") { Name = "test.bin" },
248DataContent c = new("data:,", mediaType);
261var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType);
274var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType);
287var content = new DataContent(data, "application/octet-stream");
297var content = new DataContent("data:text/plain,hello world");
306DataContent content = new(new byte[] { 1, 2, 3 }, "application/octet-stream");
457DataContent content = new(testData, "application/octet-stream");
484DataContent content = new(testData, "application/json");
511DataContent content = new(testData, "application/json")
543DataContent content = new(testData, "application/json");
572DataContent content = new(testData, "application/json");
598DataContent content = new(testData, "application/json");
628DataContent content = new(testData, "image/png") { Name = "myimage.png" };
657DataContent content = new(testData, "text/plain") { Name = $"testfile_{Guid.NewGuid()}.txt" };
702DataContent content = new(new byte[] { 1 }, "application/octet-stream");
739DataContent content = new(testData, "text/css");
796DataContent content = new(new byte[] { 1, 2, 3 }, "application/octet-stream");
836DataContent content = new(testData, "application/json")
867DataContent content = new(testData, "application/json");
925DataContent content = new(testData, "application/octet-stream");
958DataContent content = new(newContent, "application/octet-stream");
Contents\ImageGenerationToolResultContentTests.cs (5)
31IList<AIContent> outputs = [new DataContent(new byte[] { 1, 2, 3 }, "image/png")];
53new DataContent(new byte[] { 1, 2, 3 }, "image/png"),
55new DataContent(new byte[] { 4, 5, 6 }, "image/gif")
73new DataContent(new byte[] { 1, 2, 3 }, "image/png"),
98new DataContent(new byte[] { 7, 8, 9 }, "image/png"),
Image\ImageGenerationResponseTests.cs (3)
74new DataContent(imageData, "image/jpeg")
100new DataContent((byte[])[1, 2, 3, 4], "image/jpeg")
138new DataContent((byte[])[255, 216, 255, 224], "image/jpeg"),
Realtime\RealtimeClientMessageTests.cs (4)
76var audioContent = new DataContent(new byte[] { 1, 2, 3 }, "audio/pcm");
85var audioContent = new DataContent(new byte[] { 1, 2, 3 }, "audio/pcm");
88var newContent = new DataContent(new byte[] { 4, 5, 6 }, "audio/wav");
97var audioContent = new DataContent(new byte[] { 1, 2, 3 }, "audio/pcm");
TextToSpeech\TextToSpeechResponseTests.cs (6)
41content.Add(new DataContent(new byte[] { (byte)i }, "audio/mpeg"));
84List<AIContent> newContents = [new DataContent(new byte[] { 1 }, "audio/mpeg"), new DataContent(new byte[] { 2 }, "audio/mpeg")];
101new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg"),
142new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg"),
143new DataContent(new byte[] { 4, 5, 6 }, "audio/wav"),
TextToSpeech\TextToSpeechResponseUpdateExtensionsTests.cs (5)
26new([new DataContent(new byte[] { 1 }, "audio/mpeg")]) { ModelId = "model123", AdditionalProperties = new() { ["a"] = "b" } },
27new([new DataContent(new byte[] { 2 }, "audio/mpeg")]) { ModelId = "model123" },
28new([new DataContent(new byte[] { 3 }, "audio/mpeg")]) { ModelId = "model123", AdditionalProperties = new() { ["c"] = "d" } },
57new() { Contents = [new DataContent(new byte[] { 1 }, "audio/mpeg")] },
59new() { Contents = [new DataContent(new byte[] { 2 }, "audio/mpeg")] },
Microsoft.Extensions.AI.Evaluation.Integration.Tests (2)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
Microsoft.Extensions.AI.Integration.Tests (6)
Microsoft.Extensions.AI.OpenAI (18)
Microsoft.Extensions.AI.OpenAI.Tests (12)
OpenAIResponseClientTests.cs (5)
4942new FunctionResultContent("call_789", new DataContent(imageData, "image/png"))
5178new FunctionResultContent("call_pdf", new DataContent(pdfData, "application/pdf") { Name = "report.pdf" })
5573new DataContent(imageData, "image/png"),
5574new DataContent(imageData, "image/png") { AdditionalProperties = new AdditionalPropertiesDictionary { ["detail"] = ResponseImageDetailLevel.Low }},
5575new DataContent(pdfData, "application/pdf") { Name = "doc.pdf" },
Microsoft.Extensions.AI.Stabilization.Tests (9)
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\ImageGenerationToolResultContentTests.cs (5)
31IList<AIContent> outputs = [new DataContent(new byte[] { 1, 2, 3 }, "image/png")];
53new DataContent(new byte[] { 1, 2, 3 }, "image/png"),
55new DataContent(new byte[] { 4, 5, 6 }, "image/gif")
73new DataContent(new byte[] { 1, 2, 3 }, "image/png"),
98new DataContent(new byte[] { 7, 8, 9 }, "image/png"),
Microsoft.Extensions.AI.Tests (29)
Functions\AIFunctionFactoryTest.cs (15)
1172AIFunctionFactory.Create(() => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")),
1173AIFunctionFactory.Create(async () => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")),
1174AIFunctionFactory.Create(async ValueTask<DataContent> () => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")),
1179AIFunctionFactory.Create(() => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1180AIFunctionFactory.Create(async () => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1181AIFunctionFactory.Create(async ValueTask<IEnumerable<AIContent>> () => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1186AIFunctionFactory.Create(() => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1187AIFunctionFactory.Create(async () => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1188AIFunctionFactory.Create(async ValueTask<AIContent[]> () => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1193AIFunctionFactory.Create(() => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1194AIFunctionFactory.Create(async () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1195AIFunctionFactory.Create(async ValueTask<List<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1200AIFunctionFactory.Create(() => (IList<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1201AIFunctionFactory.Create(async () => (IList<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1202AIFunctionFactory.Create(async ValueTask<IList<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
Microsoft.Extensions.DataIngestion (1)
Microsoft.Extensions.DataIngestion.Tests (1)
454 references to DataContent
Microsoft.Extensions.AI (14)
Microsoft.Extensions.AI.Abstractions (66)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.DataContent.g.cs (22)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>? _DataContent;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> DataContent
24get => _DataContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.DataContent));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> Create_DataContent(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.DataContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.DataContent>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.DataContent>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
60Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Uri,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("MediaType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
100DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
102Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Name,
103Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.DataContent)obj).Name = value!,
110AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
120DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
130AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Data", InstanceMemberBindingFlags, null, typeof(global::System.ReadOnlyMemory<byte>), global::System.Array.Empty<global::System.Type>(), null),
140DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
Microsoft.Extensions.AI.Abstractions.Tests (149)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (7)
923var image1 = new DataContent((byte[])[1, 2, 3, 4], "image/png") { Name = "image1.png" };
924var image2 = new DataContent((byte[])[5, 6, 7, 8], "image/jpeg") { Name = "image2.jpg" };
925var image3 = new DataContent((byte[])[9, 10, 11, 12], "image/png") { Name = "image3.png" };
926var image4 = new DataContent((byte[])[13, 14, 15, 16], "image/gif") { Name = "image4.gif" };
981var image1 = new DataContent((byte[])[1, 2, 3, 4], "image/png") { Name = "image1.png" };
982var image2 = new DataContent((byte[])[5, 6, 7, 8], "image/jpeg") { Name = "image2.jpg" };
983var image3 = new DataContent((byte[])[9, 10, 11, 12], "image/png") { Name = "image3.png" };
Contents\DataContentTests.cs (55)
71var content = new DataContent("data:image/png;base64,aGVsbG8=", mediaType);
99DataContent content;
121static void Validate(DataContent content, string expectedData)
137var content = new DataContent(uri, mediaType);
168Assert.Throws<ArgumentNullException>("uri", () => JsonSerializer.Deserialize<DataContent>(json, TestJsonSerializerContext.Default.Options)!);
175var content = JsonSerializer.Deserialize<DataContent>("""{"uri":"data:application/octet-stream;base64,AQIDBA=="}""", TestJsonSerializerContext.Default.Options)!;
183content = JsonSerializer.Deserialize<DataContent>("""{"uri":"data:application/octet-stream;base64,AQIDBA=="}""", TestJsonSerializerContext.Default.Options)!;
189content = JsonSerializer.Deserialize<DataContent>("""
216var content = JsonSerializer.Deserialize<DataContent>(serialized, TestJsonSerializerContext.Default.Options)!;
248DataContent c = new("data:,", mediaType);
261var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType);
274var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType);
287var content = new DataContent(data, "application/octet-stream");
297var content = new DataContent("data:text/plain,hello world");
306DataContent content = new(new byte[] { 1, 2, 3 }, "application/octet-stream");
323DataContent content = await DataContent.LoadFromAsync(tempPath);
350DataContent content = await DataContent.LoadFromAsync(tempPath, "custom/type");
377DataContent content = await DataContent.LoadFromAsync(tempPath);
404DataContent content = await DataContent.LoadFromAsync(fs);
428DataContent content = await DataContent.LoadFromAsync(ms, "video/mp4");
444DataContent content = await DataContent.LoadFromAsync(ms);
457DataContent content = new(testData, "application/octet-stream");
484DataContent content = new(testData, "application/json");
511DataContent content = new(testData, "application/json")
543DataContent content = new(testData, "application/json");
572DataContent content = new(testData, "application/json");
598DataContent content = new(testData, "application/json");
628DataContent content = new(testData, "image/png") { Name = "myimage.png" };
657DataContent content = new(testData, "text/plain") { Name = $"testfile_{Guid.NewGuid()}.txt" };
684await Assert.ThrowsAsync<ArgumentNullException>("path", async () => await DataContent.LoadFromAsync((string)null!));
690await Assert.ThrowsAsync<ArgumentException>("path", async () => await DataContent.LoadFromAsync(string.Empty));
696await Assert.ThrowsAsync<ArgumentNullException>("stream", async () => await DataContent.LoadFromAsync((Stream)null!));
702DataContent content = new(new byte[] { 1 }, "application/octet-stream");
720DataContent content = await DataContent.LoadFromAsync(filePath);
739DataContent content = new(testData, "text/css");
780await DataContent.LoadFromAsync(tempPath, cancellationToken: cts.Token));
796DataContent content = new(new byte[] { 1, 2, 3 }, "application/octet-stream");
829await DataContent.LoadFromAsync(ms, cancellationToken: cts.Token));
836DataContent content = new(testData, "application/json")
867DataContent content = new(testData, "application/json");
904DataContent content = await DataContent.LoadFromAsync(tempPath);
925DataContent content = new(testData, "application/octet-stream");
958DataContent content = new(newContent, "application/octet-stream");
994var dataContent = Assert.IsType<DataContent>(result);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.DataContent.g.cs (22)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>? _DataContent;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> DataContent
22get => _DataContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.DataContent));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> Create_DataContent(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.DataContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.DataContent>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.DataContent>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
58Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Uri,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
77DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
87AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("MediaType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
98DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
100Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Name,
101Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.DataContent)obj).Name = value!,
108AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
118DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
128AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Data", InstanceMemberBindingFlags, null, typeof(global::System.ReadOnlyMemory<byte>), global::System.Array.Empty<global::System.Type>(), null),
138DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
Realtime\RealtimeClientMessageTests.cs (4)
76var audioContent = new DataContent(new byte[] { 1, 2, 3 }, "audio/pcm");
85var audioContent = new DataContent(new byte[] { 1, 2, 3 }, "audio/pcm");
88var newContent = new DataContent(new byte[] { 4, 5, 6 }, "audio/wav");
97var audioContent = new DataContent(new byte[] { 1, 2, 3 }, "audio/pcm");
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Reporting (22)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.DataContent.g.cs (21)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>? _DataContent;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> DataContent
24get => _DataContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.DataContent));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> Create_DataContent(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.DataContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.DataContent>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.DataContent>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
60Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Uri,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("MediaType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
100DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
102Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Name,
103Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.DataContent)obj).Name = value!,
110AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
120DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
140DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (22)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.DataContent.g.cs (21)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>? _DataContent;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> DataContent
24get => _DataContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.DataContent));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> Create_DataContent(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.DataContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.DataContent>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.DataContent>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
60Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Uri,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("MediaType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
100DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
102Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Name,
103Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.DataContent)obj).Name = value!,
110AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
120DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
140DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
Microsoft.Extensions.AI.Evaluation.Safety (4)
Microsoft.Extensions.AI.Integration.Tests (39)
Microsoft.Extensions.AI.OpenAI (12)
Microsoft.Extensions.AI.OpenAI.Tests (36)
Microsoft.Extensions.AI.Stabilization.Tests (30)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.DataContent.g.cs (21)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>? _DataContent;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> DataContent
22get => _DataContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.DataContent));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> Create_DataContent(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.DataContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.DataContent>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.DataContent>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
58Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Uri,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
77DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
87AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("MediaType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
98DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
100Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Name,
101Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.DataContent)obj).Name = value!,
108AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
118DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
138DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
Microsoft.Extensions.AI.Tests (25)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.DataContent.g.cs (21)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>? _DataContent;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> DataContent
22get => _DataContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.DataContent));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> Create_DataContent(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.DataContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.DataContent> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.DataContent>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.DataContent>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
58Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Uri,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
77DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
87AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("MediaType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
98DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
100Getter = static obj => ((global::Microsoft.Extensions.AI.DataContent)obj).Name,
101Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.DataContent)obj).Name = value!,
108AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.DataContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
118DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
138DeclaringType = typeof(global::Microsoft.Extensions.AI.DataContent),
Microsoft.Extensions.DataIngestion.MarkItDown (5)
Microsoft.Extensions.DataIngestion.Tests (11)
Microsoft.Extensions.VectorData.Abstractions (18)