2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
942
AIContent c = new
DerivedAIContent
{ DerivedValue = 42 };
980
AIContent c = new
DerivedAIContent
();
10 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
940
options.AddAIContentType<
DerivedAIContent
>("derivativeContent");
947
Assert.IsType<
DerivedAIContent
>(deserialized);
953
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<
DerivedAIContent
>("derivativeContent"));
977
options.AddAIContentType<
DerivedAIContent
>("text");
978
options.AddAIContentType<
DerivedAIContent
>("audio");
988
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType<
DerivedAIContent
>("discriminator"));
989
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(
DerivedAIContent
), "discriminator"));
990
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType<
DerivedAIContent
>(null!));
991
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(
DerivedAIContent
), null!));
1317
[JsonSerializable(typeof(
DerivedAIContent
))]