ComposeFile.AddService(Service) 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 service to the Compose file.
public Aspire.Hosting.Docker.Resources.ComposeFile AddService(Aspire.Hosting.Docker.Resources.ComposeNodes.Service service);
member this.AddService : Aspire.Hosting.Docker.Resources.ComposeNodes.Service -> Aspire.Hosting.Docker.Resources.ComposeFile
Public Function AddService (service As Service) As ComposeFile
Parameters
- service
- Service
The service instance to add to the Compose file.
Returns
The updated ComposeFile instance containing the added service.