Share via


ConnectorClient Constructors

Definition

Overloads

ConnectorClient(DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, MicrosoftAppCredentials, HttpClientHandler, Boolean, HttpClient, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, ServiceClientCredentials, HttpClient, Boolean, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, MicrosoftAppCredentials, HttpClientHandler, Boolean, DelegatingHandler[])
ConnectorClient(Uri, String, String, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, ServiceClientCredentials, HttpClient, Boolean)

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, MicrosoftAppCredentials, Boolean, DelegatingHandler[])
ConnectorClient(Uri, MicrosoftAppCredentials, Boolean, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, MicrosoftAppCredentials, HttpClient, Boolean, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(ServiceClientCredentials, HttpClient, Boolean)

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(Uri, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(HttpClient, Boolean)

Initializes a new instance of the ConnectorClient class.

ConnectorClient(ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

ConnectorClient(DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

protected ConnectorClient (params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Protected Sub New (ParamArray handlers As DelegatingHandler())

Parameters

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Applies to

ConnectorClient(Uri, MicrosoftAppCredentials, HttpClientHandler, Boolean, HttpClient, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials credentials, System.Net.Http.HttpClientHandler httpClientHandler, bool addJwtTokenRefresher = true, System.Net.Http.HttpClient customHttpClient = default, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials * System.Net.Http.HttpClientHandler * bool * System.Net.Http.HttpClient * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As MicrosoftAppCredentials, httpClientHandler As HttpClientHandler, Optional addJwtTokenRefresher As Boolean = true, Optional customHttpClient As HttpClient = Nothing, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Base URI for the Bot Connector service.

credentials
MicrosoftAppCredentials

Credentials for the Bot Connector service.

httpClientHandler
HttpClientHandler

The HTTP client message handler to use for this connector client.

addJwtTokenRefresher
Boolean

Deprecated, do not use.

customHttpClient
HttpClient

The HTTP client to use for this connector client.

handlers
DelegatingHandler[]

Optional, an array of DelegatingHandler objects to add to the HTTP client pipeline.

Applies to

ConnectorClient(Uri, ServiceClientCredentials, HttpClient, Boolean, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient customHttpClient, bool addJwtTokenRefresher = true, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClient * bool * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As ServiceClientCredentials, customHttpClient As HttpClient, Optional addJwtTokenRefresher As Boolean = true, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Base URI for the Bot Connector service.

credentials
Microsoft.Rest.ServiceClientCredentials

Credentials for the Bot Connector service.

customHttpClient
HttpClient

The HTTP client to use for this connector client.

addJwtTokenRefresher
Boolean

Deprecated, do not use.

handlers
DelegatingHandler[]

Optional, an array of DelegatingHandler objects to add to the HTTP client pipeline.

Applies to

ConnectorClient(Uri, MicrosoftAppCredentials, HttpClientHandler, Boolean, DelegatingHandler[])

public ConnectorClient (Uri baseUri, Microsoft.Bot.Connector.MicrosoftAppCredentials credentials, System.Net.Http.HttpClientHandler httpClientHandler, bool addJwtTokenRefresher = true, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Bot.Connector.MicrosoftAppCredentials * System.Net.Http.HttpClientHandler * bool * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As MicrosoftAppCredentials, httpClientHandler As HttpClientHandler, Optional addJwtTokenRefresher As Boolean = true, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri
httpClientHandler
HttpClientHandler
addJwtTokenRefresher
Boolean
handlers
DelegatingHandler[]

Applies to

ConnectorClient(Uri, String, String, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, string microsoftAppId = default, string microsoftAppPassword = default, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * string * string * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, Optional microsoftAppId As String = Nothing, Optional microsoftAppPassword As String = Nothing, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Base URI for the Bot Connector service.

microsoftAppId
String

Optional, the Microsoft app ID for the bot resource. If null, this setting is read from the MicrosoftAppId setting for the bot's application resource.

microsoftAppPassword
String

Optional, the Microsoft app password for the bot. If null, this setting is read from the MicrosoftAppPassword setting for the bot's application resource.

handlers
DelegatingHandler[]

Optional, an array of DelegatingHandler objects to add to the HTTP client pipeline.

Applies to

ConnectorClient(Uri, ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As ServiceClientCredentials, rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

credentials
Microsoft.Rest.ServiceClientCredentials

Required. Subscription credentials which uniquely identify client subscription.

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null.

Applies to

ConnectorClient(Uri, ServiceClientCredentials, HttpClient, Boolean)

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient customHttpClient, bool disposeHttpClient);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClient * bool -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As ServiceClientCredentials, customHttpClient As HttpClient, disposeHttpClient As Boolean)

Parameters

baseUri
Uri

Base URI for the Bot Connector service.

credentials
Microsoft.Rest.ServiceClientCredentials

Credentials for the Bot Connector service.

customHttpClient
HttpClient

The HTTP client to use for this connector client.

disposeHttpClient
Boolean

Whether to dispose the HttpClient.

Remarks

Constructor specifically designed to be the one that allows control of the disposing of the custom HttpClient. Microsoft.Rest.ServiceClient`1 only has one constructor that accepts control of the disposing of the HttpClient, so we call that overload here. All other overloads of ConnectorClient will not control this parameter and it will default to true, resulting on disposal of the provided HttpClient when the ConnectorClient is disposed. When reusing HttpClient instances across connectors, pass 'false' for disposeHttpClient to avoid ObjectDisposedException.

Applies to

ConnectorClient(Uri, MicrosoftAppCredentials, Boolean, DelegatingHandler[])

public ConnectorClient (Uri baseUri, Microsoft.Bot.Connector.MicrosoftAppCredentials credentials, bool addJwtTokenRefresher = true, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Bot.Connector.MicrosoftAppCredentials * bool * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As MicrosoftAppCredentials, Optional addJwtTokenRefresher As Boolean = true, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri
addJwtTokenRefresher
Boolean
handlers
DelegatingHandler[]

Applies to

ConnectorClient(Uri, MicrosoftAppCredentials, Boolean, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials credentials, bool addJwtTokenRefresher = true, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials * bool * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As MicrosoftAppCredentials, Optional addJwtTokenRefresher As Boolean = true, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Base URI for the Bot Connector service.

credentials
MicrosoftAppCredentials

Credentials for the Bot Connector service.

addJwtTokenRefresher
Boolean

Deprecated, do not use.

handlers
DelegatingHandler[]

Optional, an array of DelegatingHandler objects to add to the HTTP client pipeline.

Applies to

ConnectorClient(Uri, MicrosoftAppCredentials, HttpClient, Boolean, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials credentials, System.Net.Http.HttpClient customHttpClient, bool addJwtTokenRefresher = true, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials * System.Net.Http.HttpClient * bool * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As MicrosoftAppCredentials, customHttpClient As HttpClient, Optional addJwtTokenRefresher As Boolean = true, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Base URI for the Bot Connector service.

credentials
MicrosoftAppCredentials

Credentials for the Bot Connector service.

customHttpClient
HttpClient

The HTTP client to use for this connector client.

addJwtTokenRefresher
Boolean

Deprecated, do not use.

handlers
DelegatingHandler[]

Optional, an array of DelegatingHandler objects to add to the HTTP client pipeline.

Applies to

ConnectorClient(Uri, ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (baseUri As Uri, credentials As ServiceClientCredentials, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

credentials
Microsoft.Rest.ServiceClientCredentials

Required. Subscription credentials which uniquely identify client subscription.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null.

Applies to

ConnectorClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (credentials As ServiceClientCredentials, rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

credentials
Microsoft.Rest.ServiceClientCredentials

Required. Subscription credentials which uniquely identify client subscription.

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null.

Applies to

ConnectorClient(ServiceClientCredentials, HttpClient, Boolean)

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient);
new Microsoft.Bot.Connector.ConnectorClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClient * bool -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (credentials As ServiceClientCredentials, httpClient As HttpClient, disposeHttpClient As Boolean)

Parameters

credentials
Microsoft.Rest.ServiceClientCredentials

Required. Subscription credentials which uniquely identify client subscription.

httpClient
HttpClient

HttpClient to be used.

disposeHttpClient
Boolean

True: will dispose the provided httpClient on calling ConnectorClient.Dispose(). False: will not dispose provided httpClient.

Exceptions

Thrown when a required parameter is null.

Applies to

ConnectorClient(Uri, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

protected ConnectorClient (Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Protected Sub New (baseUri As Uri, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null.

Applies to

ConnectorClient(Uri, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

protected ConnectorClient (Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Uri * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Protected Sub New (baseUri As Uri, rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null.

Applies to

ConnectorClient(HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

protected ConnectorClient (System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Protected Sub New (rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Applies to

ConnectorClient(HttpClient, Boolean)

Initializes a new instance of the ConnectorClient class.

protected ConnectorClient (System.Net.Http.HttpClient httpClient, bool disposeHttpClient);
new Microsoft.Bot.Connector.ConnectorClient : System.Net.Http.HttpClient * bool -> Microsoft.Bot.Connector.ConnectorClient
Protected Sub New (httpClient As HttpClient, disposeHttpClient As Boolean)

Parameters

httpClient
HttpClient

HttpClient to be used.

disposeHttpClient
Boolean

True: will dispose the provided httpClient on calling ConnectorClient.Dispose(). False: will not dispose provided httpClient.

Applies to

ConnectorClient(ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the ConnectorClient class.

public ConnectorClient (Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.ConnectorClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.ConnectorClient
Public Sub New (credentials As ServiceClientCredentials, ParamArray handlers As DelegatingHandler())

Parameters

credentials
Microsoft.Rest.ServiceClientCredentials

Required. Subscription credentials which uniquely identify client subscription.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null.

Applies to