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