5 instantiations of LeafContent
Microsoft.Extensions.AI.Abstractions.Tests (5)
Utilities\AIJsonUtilitiesTests.cs (5)
1322DerivedAIContent dc = new LeafContent { DerivedValue = 1, LeafValue = 42 }; 1333AIContent ac = new LeafContent { DerivedValue = 2, LeafValue = 99 }; 1421DerivedAIContent dc = new LeafContent { DerivedValue = 2, LeafValue = 42 }; 1429AIContent ac2 = new LeafContent { DerivedValue = 3, LeafValue = 99 }; 1460AIContent ac = new LeafContent { DerivedValue = 1, LeafValue = 42 };
20 references to LeafContent
Microsoft.Extensions.AI.Abstractions.Tests (20)
Utilities\AIJsonUtilitiesTests.cs (20)
1308options.AddAIContentType<LeafContent>("leaf"); 1312options.AddAIContentType(typeof(LeafContent), "leaf"); 1318Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1319Assert.Contains(aiContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1328LeafContent deserializedDc = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<DerivedAIContent>(json, options)); 1339LeafContent deserializedAc = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<AIContent>(json2, options)); 1404options.AddAIContentType<LeafContent>("leaf"); 1410Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(LeafContent)); 1411Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1424LeafContent deserializedLeaf = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<DerivedAIContent>(json2, options)); 1432LeafContent deserializedAc = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<AIContent>(json3, options)); 1450options.AddAIContentType<LeafContent>("leaf"); 1455Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(LeafContent)); 1457Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1463Assert.IsType<LeafContent>(JsonSerializer.Deserialize<AIContent>(json, options)); 1944[JsonSerializable(typeof(LeafContent))]