25 references to GetDeploymentTargetAnnotation
Aspire.Hosting (3)
ApplicationModel\ContainerImageReference.cs (1)
39
var deploymentTarget = Resource.
GetDeploymentTargetAnnotation
() ?? throw new InvalidOperationException($"Resource '{Resource.Name}' does not have a deployment target.");
Publishing\ManifestPublishingContext.cs (2)
158
var deploymentTarget = project.
GetDeploymentTargetAnnotation
();
254
var deploymentTarget = container.
GetDeploymentTargetAnnotation
();
Aspire.Hosting.Azure (3)
AzureDeployingContext.cs (2)
274
if (computeResource.
GetDeploymentTargetAnnotation
() is { } deploymentTarget)
330
if (computeResource.
GetDeploymentTargetAnnotation
() is { } deploymentTarget &&
AzurePublishingContext.cs (1)
314
if (resource.
GetDeploymentTargetAnnotation
() is { } annotation && annotation.DeploymentTarget is AzureBicepResource br)
Aspire.Hosting.Azure.Tests (14)
AzureAppServiceTests.cs (2)
40
var target = container.
GetDeploymentTargetAnnotation
();
392
var projectProvisioningResource = project.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
AzureContainerAppsTests.cs (10)
105
var target = container.
GetDeploymentTargetAnnotation
();
147
var target = container.
GetDeploymentTargetAnnotation
();
179
var target = container.
GetDeploymentTargetAnnotation
();
793
var target = container.Resource.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureBicepResource;
1863
var containerProvisioningResource = container.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
1867
var projectProvisioningResource = project.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
1903
var containerProvisioningResource = container.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
1907
var projectProvisioningResource = project.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
1943
var containerProvisioningResource = container.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
1947
var projectProvisioningResource = project.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureProvisioningResource;
AzureDeployerTests.cs (1)
818
var funcAppDeployment = Assert.IsAssignableFrom<AzureProvisioningResource>(funcApp.Resource.
GetDeploymentTargetAnnotation
()?.DeploymentTarget);
AzureFunctionsTests.cs (1)
318
var (_, bicep) = await GetManifestWithBicep(funcApp.Resource.
GetDeploymentTargetAnnotation
()!.DeploymentTarget);
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
83
if (resource.
GetDeploymentTargetAnnotation
(environment)?.DeploymentTarget is DockerComposeServiceResource serviceResource)
Aspire.Hosting.Docker.Tests (1)
DockerComposeTests.cs (1)
34
Assert.Same(composeEnv.Resource, container.Resource.
GetDeploymentTargetAnnotation
()?.ComputeEnvironment);
Aspire.Hosting.Kubernetes (1)
KubernetesPublishingContext.cs (1)
72
if (resource.
GetDeploymentTargetAnnotation
(environment)?.DeploymentTarget is KubernetesResource serviceResource)
Aspire.Hosting.Tests (2)
ResourceExtensionsTests.cs (2)
309
var ex = Assert.Throws<InvalidOperationException>(() => resourceBuilder.Resource.
GetDeploymentTargetAnnotation
());
314
Assert.Equal(compute2.Resource, resourceBuilder.Resource.
GetDeploymentTargetAnnotation
()!.ComputeEnvironment);