Service.AddVolume(Volume) Method

Definition

Adds a volume to the service's list of volumes. If the volumes collection is null, it initializes a new collection before adding the volume.

public Aspire.Hosting.Docker.Resources.ComposeNodes.Service AddVolume(Aspire.Hosting.Docker.Resources.ServiceNodes.Volume volume);
member this.AddVolume : Aspire.Hosting.Docker.Resources.ServiceNodes.Volume -> Aspire.Hosting.Docker.Resources.ComposeNodes.Service
Public Function AddVolume (volume As Volume) As Service

Parameters

volume
Volume

The volume to be added to the service.

Returns

The updated Service instance with the added volume.

Applies to