Share via


Service.AddVolumes(IEnumerable<Volume>) Method

Definition

Adds multiple volumes to the service's list of volumes. If the volumes collection is empty, the provided volumes will be appended to the existing collection.

public Aspire.Hosting.Docker.Resources.ComposeNodes.Service AddVolumes(System.Collections.Generic.IEnumerable<Aspire.Hosting.Docker.Resources.ServiceNodes.Volume> volumes);
member this.AddVolumes : seq<Aspire.Hosting.Docker.Resources.ServiceNodes.Volume> -> Aspire.Hosting.Docker.Resources.ComposeNodes.Service
Public Function AddVolumes (volumes As IEnumerable(Of Volume)) As Service

Parameters

volumes
IEnumerable<Volume>

A collection of volumes to be added to the service.

Returns

The updated Service instance with the added volumes.

Applies to