你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
EventHubClientBuilderExtensions.AddEventHubProducerClient 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddEventHubProducerClient<TBuilder,TConfiguration>(TBuilder, TConfiguration) |
EventHubProducerClient使用从提供的 |
AddEventHubProducerClient<TBuilder>(TBuilder, String) |
向 EventHubProducerClient 提供的 注册实例 |
AddEventHubProducerClient<TBuilder>(TBuilder, String, String) |
EventHubProducerClient使用提供的 |
AddEventHubProducerClient<TBuilder,TConfiguration>(TBuilder, TConfiguration)
EventHubProducerClient使用从提供的 configuration
实例加载的连接选项注册实例。
public static Azure.Core.Extensions.IAzureClientBuilder<Azure.Messaging.EventHubs.Producer.EventHubProducerClient,Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions> AddEventHubProducerClient<TBuilder,TConfiguration> (this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration<TConfiguration>;
static member AddEventHubProducerClient : 'Builder * 'Configuration -> Azure.Core.Extensions.IAzureClientBuilder<Azure.Messaging.EventHubs.Producer.EventHubProducerClient, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions> (requires 'Builder :> Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration<'Configuration>)
<Extension()>
Public Function AddEventHubProducerClient(Of TBuilder As IAzureClientFactoryBuilderWithConfiguration(Of TConfiguration), TConfiguration As IAzureClientFactoryBuilderWithConfiguration(Of TConfiguration)) (builder As TBuilder, configuration As TConfiguration) As IAzureClientBuilder(Of EventHubProducerClient, EventHubProducerClientOptions)
类型参数
- TBuilder
- TConfiguration
参数
- builder
- TBuilder
- configuration
- TConfiguration
返回
适用于
AddEventHubProducerClient<TBuilder>(TBuilder, String)
向 EventHubProducerClient 提供的 注册实例 connectionString
public static Azure.Core.Extensions.IAzureClientBuilder<Azure.Messaging.EventHubs.Producer.EventHubProducerClient,Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions> AddEventHubProducerClient<TBuilder> (this TBuilder builder, string connectionString) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder;
static member AddEventHubProducerClient : 'Builder * string -> Azure.Core.Extensions.IAzureClientBuilder<Azure.Messaging.EventHubs.Producer.EventHubProducerClient, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions> (requires 'Builder :> Azure.Core.Extensions.IAzureClientFactoryBuilder)
<Extension()>
Public Function AddEventHubProducerClient(Of TBuilder As IAzureClientFactoryBuilder) (builder As TBuilder, connectionString As String) As IAzureClientBuilder(Of EventHubProducerClient, EventHubProducerClientOptions)
类型参数
- TBuilder
参数
- builder
- TBuilder
- connectionString
- String
返回
适用于
AddEventHubProducerClient<TBuilder>(TBuilder, String, String)
EventHubProducerClient使用提供的 connectionString
和 注册实例eventHubName
public static Azure.Core.Extensions.IAzureClientBuilder<Azure.Messaging.EventHubs.Producer.EventHubProducerClient,Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions> AddEventHubProducerClient<TBuilder> (this TBuilder builder, string connectionString, string eventHubName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder;
static member AddEventHubProducerClient : 'Builder * string * string -> Azure.Core.Extensions.IAzureClientBuilder<Azure.Messaging.EventHubs.Producer.EventHubProducerClient, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions> (requires 'Builder :> Azure.Core.Extensions.IAzureClientFactoryBuilder)
<Extension()>
Public Function AddEventHubProducerClient(Of TBuilder As IAzureClientFactoryBuilder) (builder As TBuilder, connectionString As String, eventHubName As String) As IAzureClientBuilder(Of EventHubProducerClient, EventHubProducerClientOptions)
类型参数
- TBuilder
参数
- builder
- TBuilder
- connectionString
- String
- eventHubName
- String