8 references to Resource
Aspire.Hosting (8)
ApplicationModel\ContainerImageReference.cs (8)
22
public string ValueExpression => $"{{{
Resource
.Name}.containerImage}}";
25
public IEnumerable<object> References => [
Resource
];
30
var deploymentTarget =
Resource
.GetDeploymentTargetAnnotation() ?? throw new InvalidOperationException($"Resource '{
Resource
.Name}' does not have a deployment target.");
31
var containerRegistry = deploymentTarget.ContainerRegistry ?? throw new InvalidOperationException($"Resource '{
Resource
.Name}' does not have a container registry.");
34
var tag =
Resource
.TryGetLastAnnotation<DeploymentImageTagAnnotation>(out var deploymentTag) ? deploymentTag.Callback() :
35
Resource
.TryGetLastAnnotation<ContainerImageAnnotation>(out var annotation) ? annotation.Tag : "latest";
36
return $"{registryEndpoint}/{
Resource
.Name.ToLowerInvariant()}:{tag}";