Udostępnij za pośrednictwem


IDistributedApplicationBuilder.Build Method

Definition

Builds and returns a new DistributedApplication instance. This can only be called once.

public Aspire.Hosting.DistributedApplication Build ();
abstract member Build : unit -> Aspire.Hosting.DistributedApplication
Public Function Build () As DistributedApplication

Returns

A new DistributedApplication instance.

Remarks

Callers of the Build() method should only call it once. are responsible for the lifecycle of the DistributedApplication instance that is returned. Note that the DistributedApplication type implements IDisposable and should be disposed of when it is no longer needed. Note that in many templates and samples Dispose is omitted for brevity because in those cases the instance is destroyed when the process exists.

Applies to