ComposeFile.AddNetwork(Network) Method

Definition

Adds a new network to the Compose file.

public Aspire.Hosting.Docker.Resources.ComposeFile AddNetwork(Aspire.Hosting.Docker.Resources.ComposeNodes.Network network);
member this.AddNetwork : Aspire.Hosting.Docker.Resources.ComposeNodes.Network -> Aspire.Hosting.Docker.Resources.ComposeFile
Public Function AddNetwork (network As Network) As ComposeFile

Parameters

network
Network

The network instance to add to the Compose file.

Returns

The updated ComposeFile instance with the added network.

Applies to