2 writes to Contents
Microsoft.Extensions.AI.Abstractions.Tests (2)
Image\ImageGenerationResponseTests.cs (2)
60Contents = null! 77response.Contents = contents;
32 references to Contents
Microsoft.Extensions.AI (1)
Image\LoggingImageGenerator.cs (1)
81if (_logger.IsEnabled(LogLevel.Trace) && response.Contents.All(c => c is not DataContent))
Microsoft.Extensions.AI.Abstractions.Tests (22)
Image\ImageGenerationResponseTests.cs (21)
17Assert.Empty(response.Contents); 18Assert.NotNull(response.Contents); 19Assert.Same(response.Contents, response.Contents); 20Assert.Empty(response.Contents); 38Assert.Same(response.Contents, response.Contents); 41Assert.Empty(response.Contents); 45Assert.Equal(contentCount, response.Contents.Count); 48UriContent uc = Assert.IsType<UriContent>(response.Contents[i]); 62Assert.NotNull(response.Contents); 63Assert.Empty(response.Contents); 78Assert.Same(contents, response.Contents); 110Assert.Equal(2, deserialized.Contents.Count); 112UriContent uriContent = Assert.IsType<UriContent>(deserialized.Contents[0]); 116DataContent dataContent = Assert.IsType<DataContent>(deserialized.Contents[1]); 130Assert.Empty(deserialized.Contents); 148Assert.Equal(3, deserialized.Contents.Count); 150Assert.IsType<UriContent>(deserialized.Contents[0]); 151Assert.IsType<DataContent>(deserialized.Contents[1]); 152Assert.IsType<TextContent>(deserialized.Contents[2]);
Image\ImageGeneratorTests.cs (1)
74Assert.Empty(result.Contents);
Microsoft.Extensions.AI.Integration.Tests (9)
ImageGeneratorIntegrationTests.cs (9)
45Assert.NotEmpty(response.Contents); 46Assert.Single(response.Contents); 48var content = response.Contents[0]; 68Assert.NotEmpty(response.Contents); 69Assert.Equal(2, response.Contents.Count); 71foreach (var content in response.Contents) 96Assert.NotEmpty(response.Contents); 97Assert.Single(response.Contents); 99var content = response.Contents[0];