6 writes to Contents
Microsoft.Extensions.AI.Abstractions (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ImageGenerationResponse.g.cs (1)
81Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ImageGenerationResponse)obj).Contents = value!,
Image\ImageGenerationResponse.cs (1)
25Contents = contents;
Microsoft.Extensions.AI.Abstractions.Tests (3)
Generated\361d1da7f942c932\TestJsonSerializerContext.ImageGenerationResponse.g.cs (1)
79Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ImageGenerationResponse)obj).Contents = value!,
Image\ImageGenerationResponseTests.cs (2)
60Contents = null! 77response.Contents = contents;
Microsoft.Extensions.AI.Tests (1)
Image\OpenTelemetryImageGeneratorTests.cs (1)
45Contents =
40 references to Contents
Microsoft.Extensions.AI (6)
ChatCompletion\ImageGeneratingChatClient.cs (4)
385if (response.Contents.Count == 0) 392foreach (var content in response.Contents) 448if (response.Contents.Count == 0) 455foreach (var content in response.Contents)
ChatCompletion\OpenTelemetryImageGenerator.cs (1)
232response.Contents is { Count: > 0 } contents &&
Image\LoggingImageGenerator.cs (1)
81if (_logger.IsEnabled(LogLevel.Trace) && response.Contents.All(c => c is not DataContent))
Microsoft.Extensions.AI.Abstractions (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ImageGenerationResponse.g.cs (1)
80Getter = static obj => ((global::Microsoft.Extensions.AI.ImageGenerationResponse)obj).Contents,
Microsoft.Extensions.AI.Abstractions.Tests (25)
Generated\361d1da7f942c932\TestJsonSerializerContext.ImageGenerationResponse.g.cs (1)
78Getter = static obj => ((global::Microsoft.Extensions.AI.ImageGenerationResponse)obj).Contents,
Image\ImageGenerationResponseTests.cs (23)
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]); 177Assert.Single(result.Contents); 178var uriContent = Assert.IsType<UriContent>(result.Contents[0]);
Image\ImageGeneratorTests.cs (1)
73Assert.Empty(result.Contents);
Microsoft.Extensions.AI.Integration.Tests (8)
ImageGeneratorIntegrationTests.cs (8)
44Assert.NotEmpty(response.Contents); 46var content = Assert.Single(response.Contents); 77Assert.NotEmpty(response.Contents); 78Assert.Equal(2, response.Contents.Count); 80foreach (var content in response.Contents) 105Assert.NotEmpty(response.Contents); 106Assert.Single(response.Contents); 108var content = response.Contents[0];