PublisherDistributedApplicationBuilderExtensions.AddPublisher<TPublisher,TPublisherOptions> 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 publisher to the distributed application for use by the Aspire CLI.
public static Aspire.Hosting.IDistributedApplicationBuilder AddPublisher<TPublisher,TPublisherOptions>(this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Action<TPublisherOptions>? configureOptions = default) where TPublisher : class, Aspire.Hosting.Publishing.IDistributedApplicationPublisher where TPublisherOptions : class;
static member AddPublisher : Aspire.Hosting.IDistributedApplicationBuilder * string * Action<'PublisherOptions (requires 'PublisherOptions : null)> -> Aspire.Hosting.IDistributedApplicationBuilder (requires 'Publisher : null and 'Publisher :> Aspire.Hosting.Publishing.IDistributedApplicationPublisher and 'PublisherOptions : null)
<Extension()>
Public Function AddPublisher(Of TPublisher As {Class, IDistributedApplicationPublisher}, TPublisherOptions As {Class, IDistributedApplicationPublisher}) (builder As IDistributedApplicationBuilder, name As String, Optional configureOptions As Action(Of TPublisherOptions) = Nothing) As IDistributedApplicationBuilder
Type Parameters
- TPublisher
The type of the publisher.
- TPublisherOptions
The type of the publisher.
Parameters
- name
- String
The name of the publisher.
- configureOptions
- Action<TPublisherOptions>
Callback to configure options for the publisher.