Freigeben über


MongoDBBuilderExtensions.WithHostPort Method

Definition

Configures the host port that the Mongo Express resource is exposed on instead of using randomly assigned port.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.MongoDB.MongoExpressContainerResource> WithHostPort (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.MongoDB.MongoExpressContainerResource> builder, int? port);
static member WithHostPort : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.MongoDB.MongoExpressContainerResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.MongoDB.MongoExpressContainerResource>
<Extension()>
Public Function WithHostPort (builder As IResourceBuilder(Of MongoExpressContainerResource), port As Nullable(Of Integer)) As IResourceBuilder(Of MongoExpressContainerResource)

Parameters

builder
IResourceBuilder<MongoExpressContainerResource>

The resource builder for Mongo Express.

port
Nullable<Int32>

The port to bind on the host. If null is used random port will be assigned.

Returns

The resource builder for PGAdmin.

Applies to