Implemented interface member:
property
Annotations
Aspire.Hosting.ApplicationModel.IResource.Annotations
1 override of Annotations
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
71
public override ResourceAnnotationCollection
Annotations
=> InnerResource?.Annotations ?? base.Annotations;
164 references to Annotations
Aspire.Hosting (1)
ApplicationModel\Resource.cs (1)
37
return $@"Type = {GetType().Name}, Name = ""{Name}"", Annotations = {
Annotations
.Count}";
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
88
provisioningResource.
Annotations
.Add(new ManifestPublishingCallbackAnnotation(provisioningResource.WriteToManifest));
Aspire.Hosting.Azure.PostgreSQL (4)
AzurePostgresExtensions.cs (2)
80
if (builder.Resource.
Annotations
.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
82
builder.Resource.
Annotations
.Remove(containerAnnotation);
AzurePostgresFlexibleServerDatabaseResource.cs (1)
52
innerResource.
Annotations
.Add(annotation);
AzurePostgresFlexibleServerResource.cs (1)
81
innerResource.
Annotations
.Add(annotation);
Aspire.Hosting.Azure.Redis (3)
AzureRedisCacheResource.cs (1)
59
innerResource.
Annotations
.Add(annotation);
AzureRedisExtensions.cs (2)
70
if (builder.Resource.
Annotations
.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
72
builder.Resource.
Annotations
.Remove(containerAnnotation);
Aspire.Hosting.Azure.Sql (6)
AzureSqlDatabaseResource.cs (1)
53
innerResource.
Annotations
.Add(annotation);
AzureSqlExtensions.cs (2)
38
if (builder.Resource.
Annotations
.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
40
builder.Resource.
Annotations
.Remove(containerAnnotation);
AzureSqlServerResource.cs (3)
71
public override ResourceAnnotationCollection Annotations => InnerResource?.
Annotations
?? base.
Annotations
;
88
innerResource.
Annotations
.Add(annotation);
Aspire.Hosting.Azure.Tests (22)
AzureEventHubsExtensionsTests.cs (9)
110
var volumeAnnotation = eventHubs.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json"));
127
var volumeAnnotation = eventHubs.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json"));
144
var volumeAnnotation = eventHubs.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json"));
161
var volumeAnnotation = eventHubs.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json"));
181
eventHubs.Resource.
Annotations
.OfType<EndpointAnnotation>(),
203
var containerImageAnnotation = eventHubs.Resource.
Annotations
.OfType<ContainerImageAnnotation>().FirstOrDefault();
324
var volumeAnnotation = eventHubsEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
376
var volumeAnnotation = eventHubsEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
446
var volumeAnnotation = eventHubsEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
AzureResourceExtensionsTests.cs (7)
33
var volumeAnnotation = storage.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
59
var volumeAnnotation = storage.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
85
var volumeAnnotation = storage.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
111
var volumeAnnotation = storage.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
130
storage.Resource.
Annotations
.OfType<EndpointAnnotation>(),
151
var endpointAnnotation = cosmos.Resource.
Annotations
.OfType<EndpointAnnotation>().FirstOrDefault();
172
var containerImageAnnotation = cosmos.Resource.
Annotations
.OfType<ContainerImageAnnotation>().FirstOrDefault();
AzureServiceBusExtensionsTests.cs (6)
276
serviceBus.Resource.
Annotations
.OfType<EndpointAnnotation>(),
298
var containerImageAnnotation = serviceBus.Resource.
Annotations
.OfType<ContainerImageAnnotation>().FirstOrDefault();
471
var volumeAnnotation = serviceBusEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
566
var volumeAnnotation = serviceBusEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
613
var volumeAnnotation = serviceBusEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
665
var volumeAnnotation = serviceBusEmulatorResource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.Containers.Tests (20)
ContainerResourceBuilderTests.cs (12)
17
Assert.Equal("redis-stack", redis.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Image);
25
Assert.Equal("redis-stack", redis.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Image);
26
Assert.Equal("1.0.0", redis.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Tag);
34
container.Resource.
Annotations
.RemoveAt(0);
37
Assert.Equal("new-image", container.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Image);
38
Assert.Equal("latest", container.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Tag);
46
container.Resource.
Annotations
.Add(new ContainerImageAnnotation { Image = "another-image" });
49
Assert.Equal("new-image", container.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Last().Image);
50
Assert.Equal("latest", container.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Last().Tag);
58
Assert.Equal("7.1", redis.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Tag);
66
Assert.Equal("myregistry.azurecr.io", redis.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().Registry);
74
Assert.Equal("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd", redis.Resource.
Annotations
.OfType<ContainerImageAnnotation>().Single().SHA256);
WithDockerfileTests.cs (8)
620
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
635
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
651
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
666
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
682
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
697
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
713
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
728
var annotation = Assert.Single(container.Resource.
Annotations
.OfType<DockerfileBuildAnnotation>());
Aspire.Hosting.Dapr (8)
DaprDistributedApplicationLifecycleHook.cs (8)
153
daprCli.
Annotations
.AddRange(distinctWaitAnnotationsToCopyToDaprCli);
174
daprCli.
Annotations
.Add(new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "grpc", port: sidecarOptions?.DaprGrpcPort));
175
daprCli.
Annotations
.Add(new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http", port: sidecarOptions?.DaprHttpPort));
176
daprCli.
Annotations
.Add(new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "metrics", port: sidecarOptions?.MetricsPort));
179
daprCli.
Annotations
.Add(new EndpointAnnotation(ProtocolType.Tcp, name: "profile", port: sidecarOptions?.ProfilePort, uriScheme: "http"));
188
daprCli.
Annotations
.Add(
226
daprCli.
Annotations
.AddRange(daprSidecar.Annotations.OfType<EnvironmentCallbackAnnotation>());
229
daprCli.
Annotations
.Add(ManifestPublishingCallbackAnnotation.Ignore);
Aspire.Hosting.Dapr.Tests (2)
DaprTests.cs (2)
88
Assert.NotNull(container.
Annotations
.OfType<DaprSidecarAnnotation>());
169
Assert.NotNull(container.
Annotations
.OfType<DaprSidecarAnnotation>());
Aspire.Hosting.Elasticsearch.Tests (4)
AddElasticsearchTests.cs (4)
29
var endpoints = containerResource.
Annotations
.OfType<EndpointAnnotation>();
50
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
91
var endpoints = containerResource.
Annotations
.OfType<EndpointAnnotation>();
112
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Garnet.Tests (8)
AddGarnetTests.cs (8)
27
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
36
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
55
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
64
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
130
var volumeAnnotation = garnet.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
155
var volumeAnnotation = garnet.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
189
var persistenceAnnotation = garnet.Resource.
Annotations
.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault();
220
var persistenceAnnotation = garnet.Resource.
Annotations
.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault();
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
28
var endpoints = containerResource.
Annotations
.OfType<EndpointAnnotation>();
49
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
123
var volumeAnnotation = kafka.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
141
var volumeAnnotation = kafka.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.Keycloak.Tests (5)
KeycloakResourceBuilderTests.cs (5)
29
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
38
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
53
var volumeAnnotation = keycloak.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
68
var volumeAnnotation = keycloak.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
99
var containerAnnotation = keycloak.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
196
Assert.Single(milvusResource.
Annotations
.OfType<EndpointAnnotation>());
198
var grpcEndpoint = milvusResource.
Annotations
.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc");
Aspire.Hosting.MongoDB.Tests (6)
AddMongoDBTests.cs (6)
29
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
38
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
57
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
66
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
119
var containerAnnotation = Assert.Single(resource.
Annotations
.OfType<ContainerImageAnnotation>());
135
var endpoint = Assert.Single(resource.
Annotations
.OfType<EndpointAnnotation>());
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
49
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
54
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
Aspire.Hosting.Nats.Tests (5)
AddNatsTests.cs (5)
99
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
108
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
141
var mountAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerMountAnnotation>());
145
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
154
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (3)
22
Assert.Single(redis.Resource.
Annotations
, a => a is HealthCheckAnnotation hca && hca.Key == "postgres_check");
409
var containerAnnotation = Assert.Single(resource.
Annotations
.OfType<ContainerImageAnnotation>());
425
var endpoint = Assert.Single(resource.
Annotations
.OfType<EndpointAnnotation>());
Aspire.Hosting.Qdrant.Tests (3)
AddQdrantTests.cs (3)
292
Assert.Equal(2, qdrantResource.
Annotations
.OfType<EndpointAnnotation>().Count());
294
var grpcEndpoint = qdrantResource.
Annotations
.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc");
302
var httpEndpoint = qdrantResource.
Annotations
.OfType<EndpointAnnotation>().Single(e => e.Name == "http");
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
142
var containerAnnotations = builder.Resource.
Annotations
.OfType<ContainerImageAnnotation>().ToList();
Aspire.Hosting.RabbitMQ.Tests (4)
AddRabbitMQTests.cs (4)
56
var primaryEndpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>().Where(e => e.Name == "tcp"));
67
var mangementEndpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>().Where(e => e.Name == "management"));
85
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
141
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Redis.Tests (13)
AddRedisTests.cs (13)
20
Assert.Single(redis.Resource.
Annotations
, a => a is HealthCheckAnnotation hca && hca.Key == "redis_check");
36
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
45
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
64
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
73
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
154
var containerAnnotation = Assert.Single(resource.
Annotations
.OfType<ContainerImageAnnotation>());
172
var containerAnnotation = Assert.Single(resource.
Annotations
.OfType<ContainerImageAnnotation>());
188
var endpoint = Assert.Single(resource.
Annotations
.OfType<EndpointAnnotation>());
202
var endpoint = Assert.Single(resource.
Annotations
.OfType<EndpointAnnotation>());
269
var volumeAnnotation = redis.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
294
var volumeAnnotation = redis.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
328
var persistenceAnnotation = redis.Resource.
Annotations
.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault();
359
var persistenceAnnotation = redis.Resource.
Annotations
.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault();
Aspire.Hosting.SqlServer.Tests (2)
AddSqlServerTests.cs (2)
49
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
58
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
Aspire.Hosting.Tests (26)
AddParameterTests.cs (2)
29
var annotation = parameterResource.
Annotations
.OfType<ResourceSnapshotAnnotation>().SingleOrDefault();
66
var annotation = parameterResource.
Annotations
.OfType<ResourceSnapshotAnnotation>().SingleOrDefault();
Dashboard\DashboardResourceTests.cs (2)
49
var initialSnapshot = Assert.Single(dashboard.
Annotations
.OfType<ResourceSnapshotAnnotation>());
516
var annotation = Assert.Single(dashboard.
Annotations
.OfType<ManifestPublishingCallbackAnnotation>());
KestrelConfigTests.cs (5)
25
resource.
Annotations
.OfType<EndpointAnnotation>(),
62
resource.
Annotations
.OfType<EndpointAnnotation>(),
94
resource.
Annotations
.OfType<EndpointAnnotation>(),
111
resource.
Annotations
.OfType<EndpointAnnotation>(),
461
foreach (var endpoint in resource.
Annotations
.OfType<EndpointAnnotation>())
ProjectResourceTests.cs (6)
75
var serviceMetadata = Assert.Single(resource.
Annotations
.OfType<IProjectMetadata>());
215
var replica = Assert.Single(resource.
Annotations
.OfType<ReplicaAnnotation>());
233
Assert.Contains(resource.
Annotations
, a => a is LaunchProfileAnnotation);
251
resource.
Annotations
.OfType<EndpointAnnotation>(),
298
Assert.Contains(resource.
Annotations
, a => a is ExcludeLaunchProfileAnnotation);
457
Assert.Contains(resource.
Annotations
, a => a is DisableForwardedHeadersAnnotation);
ResourceCommandAnnotationTests.cs (1)
43
var startCommand = resourceBuilder.Resource.
Annotations
.OfType<ResourceCommandAnnotation>().Single(a => a.Name == commandName);
SlimTestProgramTests.cs (2)
56
var endpoint = projectBuilders.Resource.
Annotations
.OfType<EndpointAnnotation>().Single();
74
var endpoint = projectBuilders.Resource.
Annotations
.OfType<EndpointAnnotation>().Single();
Utils\WithAnnotationTests.cs (4)
18
var dummyAnnotations = redis.Resource.
Annotations
.OfType<DummyAnnotation>();
32
var dummyAnnotations = redis.Resource.
Annotations
.OfType<DummyAnnotation>();
44
var firstAnnotation = redis.Resource.
Annotations
.OfType<DummyAnnotation>().Single();
48
var secondAnnotation = redis.Resource.
Annotations
.OfType<DummyAnnotation>().Single();
WithEndpointTests.cs (4)
29
var endpoint = projectA.Resource.
Annotations
.OfType<EndpointAnnotation>()
46
var endpoint = projectA.Resource.
Annotations
.OfType<EndpointAnnotation>()
81
var endpoint = projectA.Resource.
Annotations
.OfType<EndpointAnnotation>()
218
var endpoints = resource.
Annotations
.OfType<EndpointAnnotation>().ToArray();
Aspire.Hosting.Valkey.Tests (8)
AddValkeyTests.cs (8)
27
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
36
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
55
var endpoint = Assert.Single(containerResource.
Annotations
.OfType<EndpointAnnotation>());
64
var containerAnnotation = Assert.Single(containerResource.
Annotations
.OfType<ContainerImageAnnotation>());
130
var volumeAnnotation = valkey.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
155
var volumeAnnotation = valkey.Resource.
Annotations
.OfType<ContainerMountAnnotation>().Single();
189
var persistenceAnnotation = valkey.Resource.
Annotations
.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault();
220
var persistenceAnnotation = valkey.Resource.
Annotations
.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault();
TestProject.AppHost (1)
TestProgram.cs (1)
155
foreach (var endpoint in project.
Annotations
.OfType<EndpointAnnotation>())