ComposeFile.AddNetwork(Network) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.