Поделиться через


AzureEventHubsExtensions.WithHostPort Method

Definition

Configures the host port for the Azure Event Hubs emulator is exposed on instead of using randomly assigned port.

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

Parameters

builder
IResourceBuilder<AzureEventHubsEmulatorResource>

Builder for the Azure Event Hubs emulator container

port
Nullable<Int32>

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

Returns

Azure Event Hubs emulator resource builder.

Applies to