15 instantiations of ContainerImageAnnotation
Aspire.Hosting (1)
ContainerResourceBuilderExtensions.cs (1)
372imageAnnotation = new ContainerImageAnnotation { Image = parsedRegistryAndImage };
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationExtensions.cs (1)
105.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
95.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
262.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.Kusto (1)
AzureKustoBuilderExtensions.cs (1)
174.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
405.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRExtensions.cs (1)
158.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.Storage (1)
AzureStorageExtensions.cs (1)
197.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.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.Tests (1)
EndpointReferenceTests.cs (1)
371resource.Annotations.Add(new ContainerImageAnnotation { Image = "test-image" });
137 references to ContainerImageAnnotation
Aspire.Hosting (14)
ApplicationModel\ResourceExtensions.cs (1)
876if (resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } imageAnnotation)
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (1)
74r => r.Annotations.OfType<ContainerImageAnnotation>()
ContainerResourceBuilderExtensions.cs (6)
296if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } existingImageAnnotation) 326if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } existingImageAnnotation) 366if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } imageAnnotation) 416if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { } existingImageAnnotation) 623if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { }) 771if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().LastOrDefault() is { })
ContainerResourceExtensions.cs (2)
24if (resource.Annotations.OfType<ContainerImageAnnotation>().Any()) 40return resource.Annotations.OfType<ContainerImageAnnotation>().Any();
Publishing\ManifestPublishingContext.cs (1)
315/// <exception cref="DistributedApplicationException">Thrown if the container resource does not contain a <see cref="ContainerImageAnnotation"/>.</exception>
Publishing\ResourceContainerImageManager.cs (3)
283else if (resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var _)) 526if (resource.TryGetLastAnnotation<ContainerImageAnnotation>(out _) &&
Aspire.Hosting.Azure.Kusto.Tests (4)
AddAzureKustoTests.cs (4)
47var containerAnnotation = resourceBuilder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault(); 290var 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 (6)
AzureCosmosDBExtensionsTests.cs (2)
57var containerImageAnnotation = cosmos.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault();
AzureEventHubsExtensionsTests.cs (2)
270var containerImageAnnotation = eventHubs.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault();
AzureServiceBusExtensionsTests.cs (2)
188var containerImageAnnotation = serviceBus.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault();
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)
127Assert.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.Kafka.Tests (2)
AddKafkaTests.cs (2)
50var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Keycloak.Tests (2)
KeycloakResourceBuilderTests.cs (2)
50var 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)
53var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 81var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 138var 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)
676if (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>()); 433var containerAnnotation = Assert.Single(resource.Annotations.OfType<ContainerImageAnnotation>()); 460var 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)
160var containerAnnotations = builder.Resource.Annotations.OfType<ContainerImageAnnotation>().ToList(); 172var 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.Redis.Tests (8)
AddRedisTests.cs (8)
51var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 79var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>()); 371var containerAnnotation = Assert.Single(resource.Annotations.OfType<ContainerImageAnnotation>()); 389var containerAnnotation = Assert.Single(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)
57var containerAnnotation = Assert.Single(containerResource.Annotations.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Testing.Tests (2)
TestingBuilderTests.cs (2)
108var 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)
57.SelectMany(r => r.Annotations.OfType<ContainerImageAnnotation>()