Partilhar via


ResourceExtensions.TryGetContainerMounts Method

Definition

Attempts to get the container mounts for the specified resource.

public static bool TryGetContainerMounts (this Aspire.Hosting.ApplicationModel.IResource resource, out System.Collections.Generic.IEnumerable<Aspire.Hosting.ApplicationModel.ContainerMountAnnotation>? volumeMounts);
static member TryGetContainerMounts : Aspire.Hosting.ApplicationModel.IResource * seq -> bool
<Extension()>
Public Function TryGetContainerMounts (resource As IResource, ByRef volumeMounts As IEnumerable(Of ContainerMountAnnotation)) As Boolean

Parameters

resource
IResource

The resource to get the volume mounts for.

volumeMounts
IEnumerable<ContainerMountAnnotation>

When this method returns, contains the volume mounts for the specified resource, if found; otherwise, null.

Returns

true if the volume mounts were successfully retrieved; otherwise, false.

Applies to