2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
986
AIContent c = new
DerivedAIContent
{ DerivedValue = 42 };
1024
AIContent c = new
DerivedAIContent
();
10 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
984
options.AddAIContentType<
DerivedAIContent
>("derivativeContent");
991
Assert.IsType<
DerivedAIContent
>(deserialized);
997
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<
DerivedAIContent
>("derivativeContent"));
1021
options.AddAIContentType<
DerivedAIContent
>("text");
1022
options.AddAIContentType<
DerivedAIContent
>("audio");
1032
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType<
DerivedAIContent
>("discriminator"));
1033
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(
DerivedAIContent
), "discriminator"));
1034
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType<
DerivedAIContent
>(null!));
1035
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(
DerivedAIContent
), null!));
1361
[JsonSerializable(typeof(
DerivedAIContent
))]