2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
1054AIContent c = new DerivedAIContent { DerivedValue = 42 }; 1095AIContent c = new DerivedAIContent();
10 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
1052options.AddAIContentType<DerivedAIContent>("derivativeContent"); 1059Assert.IsType<DerivedAIContent>(deserialized); 1065Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<DerivedAIContent>("derivativeContent")); 1092options.AddAIContentType<DerivedAIContent>("text"); 1093options.AddAIContentType<DerivedAIContent>("audio"); 1103Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType<DerivedAIContent>("discriminator")); 1104Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(DerivedAIContent), "discriminator")); 1105Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType<DerivedAIContent>(null!)); 1106Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(DerivedAIContent), null!)); 1562[JsonSerializable(typeof(DerivedAIContent))]