BotFrameworkAdapter Constructors
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.
Overloads
BotFrameworkAdapter(ICredentialProvider, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger) |
Initializes a new instance of the BotFrameworkAdapter class, using a credential provider. |
BotFrameworkAdapter(AppCredentials, AuthenticationConfiguration, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger) |
Initializes a new instance of the BotFrameworkAdapter class, using a credential provider. |
BotFrameworkAdapter(ICredentialProvider, AuthenticationConfiguration, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger) |
Initializes a new instance of the BotFrameworkAdapter class, using a credential provider. |
BotFrameworkAdapter(ICredentialProvider, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger)
Initializes a new instance of the BotFrameworkAdapter class, using a credential provider.
public BotFrameworkAdapter (Microsoft.Bot.Connector.Authentication.ICredentialProvider credentialProvider, 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.BotFrameworkAdapter : Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * Microsoft.Rest.TransientFaultHandling.RetryPolicy * System.Net.Http.HttpClient * Microsoft.Bot.Builder.IMiddleware * Microsoft.Extensions.Logging.ILogger -> Microsoft.Bot.Builder.BotFrameworkAdapter
Public Sub New (credentialProvider As ICredentialProvider, 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)
Parameters
- credentialProvider
- ICredentialProvider
The credential provider.
- channelProvider
- IChannelProvider
The channel provider.
- connectorClientRetryPolicy
- Microsoft.Rest.TransientFaultHandling.RetryPolicy
Retry policy for retrying HTTP operations.
- customHttpClient
- HttpClient
The HTTP client.
- middleware
- IMiddleware
The middleware to initially add to the adapter.
- logger
- ILogger
The ILogger implementation this adapter should use.
Exceptions
credentialProvider
is null
.
Remarks
Use a MiddlewareSet object to add multiple middleware components in the constructor. Use the Use(IMiddleware) method to add additional middleware to the adapter after construction.
Applies to
BotFrameworkAdapter(AppCredentials, AuthenticationConfiguration, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger)
Initializes a new instance of the BotFrameworkAdapter class, using a credential provider.
public BotFrameworkAdapter (Microsoft.Bot.Connector.Authentication.AppCredentials credentials, 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.BotFrameworkAdapter : Microsoft.Bot.Connector.Authentication.AppCredentials * 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.BotFrameworkAdapter
Public Sub New (credentials As AppCredentials, 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)
Parameters
- credentials
- AppCredentials
The credentials to be used for token acquisition.
- authConfig
- AuthenticationConfiguration
The authentication configuration.
- channelProvider
- IChannelProvider
The channel provider.
- connectorClientRetryPolicy
- Microsoft.Rest.TransientFaultHandling.RetryPolicy
Retry policy for retrying HTTP operations.
- customHttpClient
- HttpClient
The HTTP client.
- middleware
- IMiddleware
The middleware to initially add to the adapter.
- logger
- ILogger
The ILogger implementation this adapter should use.
Exceptions
throw ArgumentNullException.
Remarks
Use a MiddlewareSet object to add multiple middleware components in the constructor. Use the Use(IMiddleware) method to add additional middleware to the adapter after construction.
Applies to
BotFrameworkAdapter(ICredentialProvider, AuthenticationConfiguration, IChannelProvider, RetryPolicy, HttpClient, IMiddleware, ILogger)
Initializes a new instance of the BotFrameworkAdapter class, using a credential provider.
public BotFrameworkAdapter (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.BotFrameworkAdapter : 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.BotFrameworkAdapter
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)
Parameters
- credentialProvider
- ICredentialProvider
The credential provider.
- authConfig
- AuthenticationConfiguration
The authentication configuration.
- channelProvider
- IChannelProvider
The channel provider.
- connectorClientRetryPolicy
- Microsoft.Rest.TransientFaultHandling.RetryPolicy
Retry policy for retrying HTTP operations.
- customHttpClient
- HttpClient
The HTTP client.
- middleware
- IMiddleware
The middleware to initially add to the adapter.
- logger
- ILogger
The ILogger implementation this adapter should use.
Exceptions
credentialProvider
is null
.
Remarks
Use a MiddlewareSet object to add multiple middleware components in the constructor. Use the Use(IMiddleware) method to add additional middleware to the adapter after construction.