Freigeben über


IDistributedApplicationBuilderExtensions.AddDaprPubSub Method

Definition

Adds a "generic" Dapr pub-sub component to the application model. Aspire will configure an appropriate type when running or deploying.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Dapr.IDaprComponentResource> AddDaprPubSub (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.Dapr.DaprComponentOptions? options = default);
static member AddDaprPubSub : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.Dapr.DaprComponentOptions -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Dapr.IDaprComponentResource>
<Extension()>
Public Function AddDaprPubSub (builder As IDistributedApplicationBuilder, name As String, Optional options As DaprComponentOptions = Nothing) As IResourceBuilder(Of IDaprComponentResource)

Parameters

builder
IDistributedApplicationBuilder

The distributed application builder instance.

name
String

The name of the component.

options
DaprComponentOptions

Options for configuring the component, if any.

Returns

A reference to the IResourceBuilder<T>.

Applies to