18 references to GetDeploymentTargetAnnotation
Aspire.Hosting (3)
ApplicationModel\ContainerImageReference.cs (1)
30
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)
174
if (computeResource.
GetDeploymentTargetAnnotation
() is { } deploymentTarget)
209
if (computeResource.
GetDeploymentTargetAnnotation
() is { } deploymentTarget &&
AzurePublishingContext.cs (1)
311
if (resource.
GetDeploymentTargetAnnotation
() is { } annotation && annotation.DeploymentTarget is AzureBicepResource br)
Aspire.Hosting.Azure.Tests (7)
AzureAppServiceTests.cs (1)
39
var target = container.
GetDeploymentTargetAnnotation
();
AzureContainerAppsTests.cs (4)
104
var target = container.
GetDeploymentTargetAnnotation
();
146
var target = container.
GetDeploymentTargetAnnotation
();
178
var target = container.
GetDeploymentTargetAnnotation
();
748
var target = container.Resource.
GetDeploymentTargetAnnotation
()?.DeploymentTarget as AzureBicepResource;
AzureDeployerTests.cs (1)
467
var funcAppDeployment = Assert.IsType<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)
308
var ex = Assert.Throws<InvalidOperationException>(() => resourceBuilder.Resource.
GetDeploymentTargetAnnotation
());
313
Assert.Equal(compute2.Resource, resourceBuilder.Resource.
GetDeploymentTargetAnnotation
()!.ComputeEnvironment);