ResourceExtensions.TryGetContainerMounts Method

Definition

Attempts to get the container mounts for the specified resource.

C#
public static bool TryGetContainerMounts(this Aspire.Hosting.ApplicationModel.IResource resource, out System.Collections.Generic.IEnumerable<Aspire.Hosting.ApplicationModel.ContainerMountAnnotation>? volumeMounts);

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

Producto Versiones
.NET Aspire 8.0.0, 9.0.0, 9.1.0