Share via


ResourceExtensions.TryGetContainerImageName Method

Definition

Overloads

TryGetContainerImageName(IResource, String)

Attempts to get the container image name from the given resource.

TryGetContainerImageName(IResource, Boolean, String)

Attempts to get the container image name from the given resource.

TryGetContainerImageName(IResource, String)

Source:
ResourceExtensions.cs
Source:
ResourceExtensions.cs
Source:
ResourceExtensions.cs
Source:
ResourceExtensions.cs
Source:
ResourceExtensions.cs
Source:
ResourceExtensions.cs
Source:
ResourceExtensions.cs

Attempts to get the container image name from the given resource.

public static bool TryGetContainerImageName(this Aspire.Hosting.ApplicationModel.IResource resource, out string? imageName);
static member TryGetContainerImageName : Aspire.Hosting.ApplicationModel.IResource * string -> bool
<Extension()>
Public Function TryGetContainerImageName (resource As IResource, ByRef imageName As String) As Boolean

Parameters

resource
IResource

The resource to get the container image name from.

imageName
String

The container image name if found, otherwise null.

Returns

True if the container image name was found, otherwise false.

Applies to

TryGetContainerImageName(IResource, Boolean, String)

Source:
ResourceExtensions.cs

Attempts to get the container image name from the given resource.

public static bool TryGetContainerImageName(this Aspire.Hosting.ApplicationModel.IResource resource, bool useBuiltImage, out string? imageName);
static member TryGetContainerImageName : Aspire.Hosting.ApplicationModel.IResource * bool * string -> bool
<Extension()>
Public Function TryGetContainerImageName (resource As IResource, useBuiltImage As Boolean, ByRef imageName As String) As Boolean

Parameters

resource
IResource

The resource to get the container image name from.

useBuiltImage
Boolean

When true, uses the image name from DockerfileBuildAnnotation if present. When false, uses only ContainerImageAnnotation.

imageName
String

The container image name if found, otherwise null.

Returns

True if the container image name was found, otherwise false.

Applies to