7 instantiations of DeploymentTargetAnnotation
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
52
r.Annotations.Add(new
DeploymentTargetAnnotation
(containerApp)
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceInfrastructure.cs (1)
50
resource.Annotations.Add(new
DeploymentTargetAnnotation
(website)
Aspire.Hosting.Docker (2)
DockerComposeInfrastructure.cs (2)
44
dashboard.Annotations.Add(new
DeploymentTargetAnnotation
(dashboardService)
62
r.Annotations.Add(new
DeploymentTargetAnnotation
(serviceResource)
Aspire.Hosting.Kubernetes (1)
KubernetesInfrastructure.cs (1)
45
r.Annotations.Add(new
DeploymentTargetAnnotation
(serviceResource)
Aspire.Hosting.Tests (2)
ResourceExtensionsTests.cs (2)
305
.WithAnnotation(new
DeploymentTargetAnnotation
(compute1.Resource) { ComputeEnvironment = compute1.Resource })
306
.WithAnnotation(new
DeploymentTargetAnnotation
(compute2.Resource) { ComputeEnvironment = compute2.Resource });
90 references to DeploymentTargetAnnotation
Aspire.Hosting (6)
ApplicationModel\ContainerImageReference.cs (1)
30
var
deploymentTarget = Resource.GetDeploymentTargetAnnotation() ?? throw new InvalidOperationException($"Resource '{Resource.Name}' does not have a deployment target.");
ApplicationModel\ResourceExtensions.cs (2)
600
public static
DeploymentTargetAnnotation
? GetDeploymentTargetAnnotation(this IResource resource, IComputeEnvironmentResource? targetComputeEnvironment = null)
616
if (resource.TryGetAnnotationsOfType<
DeploymentTargetAnnotation
>(out var deploymentTargetAnnotations))
Publishing\ManifestPublishingContext.cs (3)
158
var
deploymentTarget = project.GetDeploymentTargetAnnotation();
182
private async Task WriteDeploymentTarget(
DeploymentTargetAnnotation
deploymentTarget)
254
var
deploymentTarget = container.GetDeploymentTargetAnnotation();
Aspire.Hosting.Azure (4)
AzureDeployingContext.cs (4)
190
if (computeResource.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
deploymentTarget))
225
if (computeResource.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
deploymentTarget) &&
Aspire.Hosting.Azure.Tests (80)
AzureAppServiceTests.cs (11)
39
var
target = container.GetDeploymentTargetAnnotation();
102
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
137
project2.Resource.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
169
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
205
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
241
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
AzureContainerAppsTests.cs (55)
40
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
74
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
104
var
target = container.GetDeploymentTargetAnnotation();
146
var
target = container.GetDeploymentTargetAnnotation();
178
var
target = container.GetDeploymentTargetAnnotation();
221
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
251
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
325
proj.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
402
proj.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
441
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
473
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
507
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
543
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
581
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
621
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
653
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
693
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
775
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
818
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
849
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
881
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
912
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
951
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
995
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
1036
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
1281
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
1332
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
1445
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
1492
container.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
AzureUserAssignedIdentityTests.cs (10)
125
var
deploymentTarget = Assert.Single(computeResource.Annotations.OfType<
DeploymentTargetAnnotation
>());
177
var
deploymentTarget = Assert.Single(computeResource.Annotations.OfType<
DeploymentTargetAnnotation
>());
232
var
deploymentTarget = Assert.Single(computeResource.Annotations.OfType<
DeploymentTargetAnnotation
>());
317
var
deploymentTarget = Assert.Single(computeResource.Annotations.OfType<
DeploymentTargetAnnotation
>());
318
var
deploymentTarget2 = Assert.Single(computeResource2.Annotations.OfType<
DeploymentTargetAnnotation
>());
ContainerRegistryTests.cs (4)
62
project.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
target);
158
if (resource.TryGetLastAnnotation<
DeploymentTargetAnnotation
>(out
var
annotation) &&