BotFrameworkHttpAdapter 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
BotFrameworkHttpAdapter(IConfiguration, ILogger<BotFrameworkHttpAdapter>)
初始化 BotFrameworkHttpAdapter 类的新实例。
protected BotFrameworkHttpAdapter(Microsoft.Extensions.Configuration.IConfiguration configuration, Microsoft.Extensions.Logging.ILogger<Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter> logger = default);
new Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter : Microsoft.Extensions.Configuration.IConfiguration * Microsoft.Extensions.Logging.ILogger<Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter> -> Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter
Protected Sub New (configuration As IConfiguration, Optional logger As ILogger(Of BotFrameworkHttpAdapter) = Nothing)
参数
- configuration
- IConfiguration
一个 IConfiguration 实例。
- logger
- ILogger<BotFrameworkHttpAdapter>
此适配器应使用的 ILogger 实现。
适用于
BotFrameworkHttpAdapter(ICredentialProvider, IChannelProvider, ILogger<BotFrameworkHttpAdapter>)
使用凭据提供程序初始化 类的新实例 BotFrameworkHttpAdapter 。
public BotFrameworkHttpAdapter(Microsoft.Bot.Connector.Authentication.ICredentialProvider credentialProvider = default, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider = default, Microsoft.Extensions.Logging.ILogger<Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter> logger = default);
new Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter : Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * Microsoft.Extensions.Logging.ILogger<Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter> -> Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter
Public Sub New (Optional credentialProvider As ICredentialProvider = Nothing, Optional channelProvider As IChannelProvider = Nothing, Optional logger As ILogger(Of BotFrameworkHttpAdapter) = Nothing)
参数
- credentialProvider
- ICredentialProvider
凭据提供程序。
- channelProvider
- IChannelProvider
通道提供程序。
- logger
- ILogger<BotFrameworkHttpAdapter>
此适配器应使用的 ILogger 实现。
适用于
BotFrameworkHttpAdapter(ICredentialProvider, IChannelProvider, HttpClient, ILogger<BotFrameworkHttpAdapter>)
使用凭据提供程序初始化 类的新实例 BotFrameworkHttpAdapter 。
public BotFrameworkHttpAdapter(Microsoft.Bot.Connector.Authentication.ICredentialProvider credentialProvider, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider, System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILogger<Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter> logger);
new Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter : Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILogger<Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter> -> Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter
Public Sub New (credentialProvider As ICredentialProvider, channelProvider As IChannelProvider, httpClient As HttpClient, logger As ILogger(Of BotFrameworkHttpAdapter))
参数
- credentialProvider
- ICredentialProvider
凭据提供程序。
- channelProvider
- IChannelProvider
通道提供程序。
- httpClient
- HttpClient
使用的 HttpClient 。
- logger
- ILogger<BotFrameworkHttpAdapter>
此适配器应使用的 ILogger 实现。
适用于
BotFrameworkHttpAdapter(ICredentialProvider, AuthenticationConfiguration, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger)
使用凭据提供程序初始化 类的新实例 BotFrameworkHttpAdapter 。
public BotFrameworkHttpAdapter(Microsoft.Bot.Connector.Authentication.ICredentialProvider credentialProvider, Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration authConfig, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider = default, Microsoft.Rest.TransientFaultHandling.RetryPolicy connectorClientRetryPolicy = default, System.Net.Http.HttpClient customHttpClient = default, Microsoft.Bot.Builder.IMiddleware middleware = default, Microsoft.Extensions.Logging.ILogger logger = default);
new Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter : Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration * Microsoft.Bot.Connector.Authentication.IChannelProvider * Microsoft.Rest.TransientFaultHandling.RetryPolicy * System.Net.Http.HttpClient * Microsoft.Bot.Builder.IMiddleware * Microsoft.Extensions.Logging.ILogger -> Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter
Public Sub New (credentialProvider As ICredentialProvider, authConfig As AuthenticationConfiguration, Optional channelProvider As IChannelProvider = Nothing, Optional connectorClientRetryPolicy As RetryPolicy = Nothing, Optional customHttpClient As HttpClient = Nothing, Optional middleware As IMiddleware = Nothing, Optional logger As ILogger = Nothing)
参数
- credentialProvider
- ICredentialProvider
凭据提供程序。
- authConfig
- AuthenticationConfiguration
身份验证配置。
- channelProvider
- IChannelProvider
通道提供程序。
- connectorClientRetryPolicy
- Microsoft.Rest.TransientFaultHandling.RetryPolicy
用于重试 HTTP 操作的重试策略。
- customHttpClient
- HttpClient
HTTP 客户端。
- middleware
- IMiddleware
要最初添加到适配器的中间件。
- logger
- ILogger
此适配器应使用的 ILogger 实现。
例外
credentialProvider 为 null。
注解
MiddlewareSet使用 对象在构造函数中添加多个中间件组件。 在构造后,使用 IMiddleware 方法向适配器添加其他中间件。
适用于
BotFrameworkHttpAdapter(IConfiguration, ICredentialProvider, AuthenticationConfiguration, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger)
初始化 BotFrameworkHttpAdapter 类的新实例。
protected BotFrameworkHttpAdapter(Microsoft.Extensions.Configuration.IConfiguration configuration, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentialProvider, Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration authConfig = default, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider = default, Microsoft.Rest.TransientFaultHandling.RetryPolicy connectorClientRetryPolicy = default, System.Net.Http.HttpClient customHttpClient = default, Microsoft.Bot.Builder.IMiddleware middleware = default, Microsoft.Extensions.Logging.ILogger logger = default);
new Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter : Microsoft.Extensions.Configuration.IConfiguration * Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration * Microsoft.Bot.Connector.Authentication.IChannelProvider * Microsoft.Rest.TransientFaultHandling.RetryPolicy * System.Net.Http.HttpClient * Microsoft.Bot.Builder.IMiddleware * Microsoft.Extensions.Logging.ILogger -> Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter
Protected Sub New (configuration As IConfiguration, credentialProvider As ICredentialProvider, Optional authConfig As AuthenticationConfiguration = Nothing, Optional channelProvider As IChannelProvider = Nothing, Optional connectorClientRetryPolicy As RetryPolicy = Nothing, Optional customHttpClient As HttpClient = Nothing, Optional middleware As IMiddleware = Nothing, Optional logger As ILogger = Nothing)
参数
- configuration
- IConfiguration
一个 IConfiguration 实例。
- credentialProvider
- ICredentialProvider
凭据提供程序。
- authConfig
- AuthenticationConfiguration
身份验证配置。
- channelProvider
- IChannelProvider
通道提供程序。
- connectorClientRetryPolicy
- Microsoft.Rest.TransientFaultHandling.RetryPolicy
用于重试 HTTP 操作的重试策略。
- customHttpClient
- HttpClient
HTTP 客户端。
- middleware
- IMiddleware
要最初添加到适配器的中间件。
- logger
- ILogger
此适配器应使用的 ILogger 实现。