23 instantiations of ContainerImageAnnotation
Aspire.Hosting (1)
ContainerResourceBuilderExtensions.cs (1)
465imageAnnotation = new ContainerImageAnnotation { Image = parsedRegistryAndImage };
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationExtensions.cs (1)
113.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
112.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.EntraId.Tests (1)
EntraIdKeyVaultCertificateTests.cs (1)
86var vault = builder.AddAzureKeyVault("vault").WithAnnotation(new ContainerImageAnnotation { Image = "emulator" });
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
274.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.Functions (1)
DurableTask\DurableTaskResourceExtensions.cs (1)
158.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.Kusto (1)
AzureKustoBuilderExtensions.cs (1)
179.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
421.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRExtensions.cs (1)
164.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.Storage (1)
AzureStorageExtensions.cs (1)
204.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.Tests (3)
AzureKeyVaultTests.cs (3)
408keyVault.Resource.Annotations.Add(new ContainerImageAnnotation 424keyVault.Resource.Annotations.Add(new ContainerImageAnnotation 484keyVault.Resource.Annotations.Add(new ContainerImageAnnotation
Aspire.Hosting.Azure.WebPubSub (1)
AzureWebPubSubExtensions.cs (1)
193.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Blazor.Tests (1)
GatewayConfigurationBuilderTests.cs (1)
619caller.Annotations.Add(new ContainerImageAnnotation { Image = "gateway" });
Aspire.Hosting.Containers.Tests (3)
ContainerImageAnnotationTests.cs (2)
13var annotation = new ContainerImageAnnotation() 28var annotation = new ContainerImageAnnotation()
ContainerResourceBuilderTests.cs (1)
45container.Resource.Annotations.Add(new ContainerImageAnnotation { Image = "another-image" });
Aspire.Hosting.Radius (1)
RadiusExtensions.cs (1)
192builder.Resource.Annotations.Add(new ContainerImageAnnotation
Aspire.Hosting.Tests (4)
Dcp\DcpExecutorTests.cs (1)
1547.WithAnnotation(new ContainerImageAnnotation { Image = "image" })
DotnetProgramPublishingTests.cs (2)
201.WithAnnotation(new ContainerImageAnnotation 254.WithAnnotation(new ContainerImageAnnotation
EndpointReferenceTests.cs (1)
407resource.Annotations.Add(new ContainerImageAnnotation { Image = "test-image" });
174 references to ContainerImageAnnotation
Aspire.Hosting (14)
ApplicationModel\ResourceExtensions.cs (2)
952if (resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } imageAnnotation) 1039return resource.TryGetLastAnnotation<ContainerImageAnnotation>(out _) &&
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (1)
72r => r.Annotations.OfType<ContainerImageAnnotation>()
ContainerResourceBuilderExtensions.cs (6)
387if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } existingImageAnnotation) 418if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } existingImageAnnotation) 459if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } imageAnnotation) 510if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } existingImageAnnotation) 744if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { }) 894if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { })
ContainerResourceExtensions.cs (2)
25if (resource.Annotations.OfType<ContainerImageAnnotation>().Any()) 42return resource.Annotations.OfType<ContainerImageAnnotation>().Any();
Publishing\ManifestPublishingContext.cs (1)
379/// <exception cref="DistributedApplicationException">Thrown if the container resource does not contain a <see cref="ContainerImageAnnotation"/>.</exception>
Publishing\ResourceContainerImageManager.cs (2)
951if (resource.TryGetLastAnnotation<ContainerImageAnnotation>(out _) && 1097if (resource.TryGetLastAnnotation<ContainerImageAnnotation>(out _) &&
Aspire.Hosting.Azure.Kusto.Tests (4)
AddAzureKustoTests.cs (4)
49var containerAnnotation = resourceBuilder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault(); 292var containerImageAnnotation = resourceBuilder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault();
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
87if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
70if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
46if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
Aspire.Hosting.Azure.Tests (26)
AzureCosmosDBExtensionsTests.cs (10)
59var containerImageAnnotation = cosmos.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault(); 911var image = Assert.Single(cosmos.Resource.Annotations.OfType<ContainerImageAnnotation>()); 926var image = Assert.Single(cosmos.Resource.Annotations.OfType<ContainerImageAnnotation>()); 939var image = Assert.Single(cosmos.Resource.Annotations.OfType<ContainerImageAnnotation>()); 1202Assert.DoesNotContain(cosmos.Resource.Annotations, a => a is ContainerImageAnnotation); 1215Assert.DoesNotContain(cosmos.Resource.Annotations, a => a is ContainerImageAnnotation);
AzureEventHubsExtensionsTests.cs (2)
272var containerImageAnnotation = eventHubs.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault();
AzureRunAsEmulatorModeTests.cs (2)
36Assert.Contains(builder.Resources, resource => resource.Annotations.OfType<ContainerImageAnnotation>().Any()); 51Assert.DoesNotContain(builder.Resources, resource => resource.Annotations.OfType<ContainerImageAnnotation>().Any());
AzureServiceBusExtensionsTests.cs (8)
191var containerImageAnnotation = serviceBus.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault(); 650var imageAnnotation = Assert.Single(sql.Annotations.OfType<ContainerImageAnnotation>()); 697var imageAnnotation = Assert.Single(sql.Annotations.OfType<ContainerImageAnnotation>()); 827var imageAnnotation = Assert.Single(sql.Annotations.OfType<ContainerImageAnnotation>());
AzureWebPubSubEmulatorTests.cs (2)
39var image = Assert.Single(webPubSub.Resource.Annotations.OfType<ContainerImageAnnotation>());
DurableTaskResourceExtensionsTests.cs (2)
212var containerImageAnnotation = dts.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault();
Aspire.Hosting.Containers.Tests (30)
ContainerImageAnnotationTests.cs (2)
13var annotation = new ContainerImageAnnotation() 28var annotation = new ContainerImageAnnotation()
ContainerResourceBuilderTests.cs (18)
16Assert.Equal("redis-stack", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image); 24Assert.Equal("redis-stack", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image); 25Assert.Equal("1.0.0", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); 36Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image); 37Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); 48Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Image); 49Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Tag); 57Assert.Equal("7.1", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); 65Assert.Equal("myregistry.azurecr.io", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Registry); 73Assert.Equal("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().SHA256); 151var annotation = redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single(); 163var annotation = redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single(); 176var annotation = redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single(); 220var containerImage = builder.Resource.Annotations.OfType<ContainerImageAnnotation>().Single();
ContainerResourceTests.cs (8)
26var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 45var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 64var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 84var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
WithDockerfileTests.cs (2)
129Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation));
Aspire.Hosting.Garnet.Tests (4)
AddGarnetTests.cs (4)
36var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 64var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Java.Tests (4)
AddJavaContainerTests.cs (4)
65var image = Assert.Single(app.Resource.Annotations.OfType<ContainerImageAnnotation>()); 77var image = Assert.Single(app.Resource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
111var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Keycloak.Tests (2)
KeycloakResourceBuilderTests.cs (2)
54var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Milvus.Tests (4)
AddMilvusTests.cs (4)
30var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 60var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.MongoDB.Tests (6)
AddMongoDBTests.cs (6)
59var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 87var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 201var containerAnnotation = Assert.Single(resource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.MySql.Tests (4)
AddMySqlTests.cs (4)
49var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 88var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
113var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 159var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Oracle.Tests (6)
AddOracleTests.cs (6)
47var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 86var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 168var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
769if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } imageAnnotation)
Aspire.Hosting.PostgreSQL.Tests (10)
AddPostgresTests.cs (10)
58var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 112var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 228var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 455var containerAnnotation = Assert.Single(resource.Annotations.OfType<ContainerImageAnnotation>()); 482var imageAnnotation = container.Annotations.OfType<ContainerImageAnnotation>().Single();
Aspire.Hosting.Qdrant.Tests (6)
AddQdrantTests.cs (6)
57var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 96var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 129var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.RabbitMQ (2)
RabbitMQBuilderExtensions.cs (2)
177var containerAnnotations = builder.Resource.Annotations.OfType<ContainerImageAnnotation>().ToList(); 189var annotation = containerAnnotations[0];
Aspire.Hosting.RabbitMQ.Tests (4)
AddRabbitMQTests.cs (4)
84var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 144var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Radius (5)
Publishing\RadiusInfrastructureBuilder.cs (2)
2054var imageAnnotation = resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault();
RadiusExtensions.cs (3)
127/// The reference is stored as a <see cref="ContainerImageAnnotation"/>, which is also 186var existing = builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault();
Aspire.Hosting.Radius.Tests (6)
RadiusExtensionsTests.cs (6)
171var annotation = project.Resource.Annotations.OfType<ContainerImageAnnotation>().Single(); 195var annotation = project.Resource.Annotations.OfType<ContainerImageAnnotation>().Single(); 209var annotation = Assert.Single(project.Resource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Redis.Tests (8)
AddRedisTests.cs (8)
55var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 83var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 447var containerAnnotation = Assert.Single(resource.Annotations.OfType<ContainerImageAnnotation>()); 465var containerAnnotation = Assert.Single(resource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.RemoteHost.Tests (2)
CapabilityDispatcherTests.cs (2)
50var annotation = Assert.Single(resource.Resource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Seq.Tests (8)
AddSeqTests.cs (8)
35var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 63var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 189var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 222var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.SqlServer.Tests (2)
AddSqlServerTests.cs (2)
61var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Testing.Tests (2)
TestingBuilderTests.cs (2)
128var containerImageAnnotation = resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault();
Aspire.Hosting.Valkey.Tests (4)
AddValkeyTests.cs (4)
36var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 64var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Playground.Tests (1)
Infrastructure\DistributedApplicationTestFactory.cs (1)
58.SelectMany(r => r.Annotations.OfType<ContainerImageAnnotation>()