File: ApplicationModel\ContainerImageReference.cs
Web Access
Project: src\src\Aspire.Hosting\Aspire.Hosting.csproj (Aspire.Hosting)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using System.Diagnostics;
 
namespace Aspire.Hosting.ApplicationModel;
 
/// <summary>
/// Represents the fully‑qualified container image reference that should be deployed.
/// </summary>
[DebuggerDisplay("{ValueExpression}")]
public class ContainerImageReference(IResource resource) : IManifestExpressionProvider, IValueWithReferences
{
    /// <summary>
    /// Gets the resource that this container image is associated with.
    /// </summary>
    public IResource Resource { get; } = resource;
 
    /// <inheritdoc/>
    public string ValueExpression => $"{{{Resource.Name}.containerImage}}";
 
    /// <inheritdoc/>
    public IEnumerable<object> References => [Resource];
}