ConnectorClient 构造函数

定义

重载

ConnectorClient(DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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

初始化 ConnectorClient 类的新实例。

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

初始化 ConnectorClient 类的新实例。

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

初始化 ConnectorClient 类的新实例。

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

初始化 ConnectorClient 类的新实例。

ConnectorClient(Uri, ServiceClientCredentials, HttpClient, Boolean)

初始化 ConnectorClient 类的新实例。

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

初始化 ConnectorClient 类的新实例。

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

初始化 ConnectorClient 类的新实例。

ConnectorClient(Uri, ServiceClientCredentials, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

ConnectorClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

ConnectorClient(ServiceClientCredentials, HttpClient, Boolean)

初始化 ConnectorClient 类的新实例。

ConnectorClient(Uri, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

ConnectorClient(Uri, HttpClientHandler, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

ConnectorClient(HttpClientHandler, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

ConnectorClient(HttpClient, Boolean)

初始化 ConnectorClient 类的新实例。

ConnectorClient(ServiceClientCredentials, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

ConnectorClient(DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委托处理程序。

适用于

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

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

Bot Connector 服务的基 URI。

credentials
MicrosoftAppCredentials

Bot Connector 服务的凭据。

httpClientHandler
HttpClientHandler

要用于此连接器客户端的 HTTP 客户端消息处理程序。

addJwtTokenRefresher
Boolean

已弃用,请勿使用。

customHttpClient
HttpClient

要用于此连接器客户端的 HTTP 客户端。

handlers
DelegatingHandler[]

可选,要添加到 HTTP 客户端管道的 对象的数组 DelegatingHandler

适用于

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

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

Bot Connector 服务的基 URI。

credentials
Microsoft.Rest.ServiceClientCredentials

Bot Connector 服务的凭据。

customHttpClient
HttpClient

要用于此连接器客户端的 HTTP 客户端。

addJwtTokenRefresher
Boolean

已弃用,请勿使用。

handlers
DelegatingHandler[]

可选,要添加到 HTTP 客户端管道的 对象的数组 DelegatingHandler

适用于

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())

参数

baseUri
Uri
httpClientHandler
HttpClientHandler
addJwtTokenRefresher
Boolean
handlers
DelegatingHandler[]

适用于

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

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

Bot Connector 服务的基 URI。

microsoftAppId
String

(可选)机器人资源的 Microsoft 应用 ID。 如果为 null,则从 MicrosoftAppId 机器人应用程序资源的 设置中读取此设置。

microsoftAppPassword
String

(可选)机器人的 Microsoft 应用密码。 如果为 null,则从 MicrosoftAppPassword 机器人应用程序资源的 设置中读取此设置。

handlers
DelegatingHandler[]

可选,要添加到 HTTP 客户端管道的 对象的数组 DelegatingHandler

适用于

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

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

可选。 服务的基 URI。

credentials
Microsoft.Rest.ServiceClientCredentials

必需。 唯一标识客户端订阅的订阅凭据。

rootHandler
HttpClientHandler

可选。 用于处理 http 传输的 http 客户端处理程序。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委托处理程序。

例外

当所需参数为 null 时引发。

适用于

ConnectorClient(Uri, ServiceClientCredentials, HttpClient, Boolean)

初始化 ConnectorClient 类的新实例。

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)

参数

baseUri
Uri

Bot Connector 服务的基 URI。

credentials
Microsoft.Rest.ServiceClientCredentials

Bot Connector 服务的凭据。

customHttpClient
HttpClient

要用于此连接器客户端的 HTTP 客户端。

disposeHttpClient
Boolean

是否释放 HttpClient

注解

构造函数专门设计为允许控制自定义 HttpClient的释放。 Microsoft.Rest.ServiceClient`1 只有一个构造函数接受对 释放的控制 HttpClient,因此我们在此处调用该重载。 的ConnectorClient所有其他重载不会控制此参数,并且它将默认为 true,导致在释放 时ConnectorClient释放提供的 HttpClient 。 跨连接器重用 HttpClient 实例时,请为 传递“false” disposeHttpClient 以避免 ObjectDisposedException

适用于

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())

参数

baseUri
Uri
addJwtTokenRefresher
Boolean
handlers
DelegatingHandler[]

适用于

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

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

Bot Connector 服务的基 URI。

credentials
MicrosoftAppCredentials

Bot Connector 服务的凭据。

addJwtTokenRefresher
Boolean

已弃用,请勿使用。

handlers
DelegatingHandler[]

可选,要添加到 HTTP 客户端管道的 对象的数组 DelegatingHandler

适用于

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

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

Bot Connector 服务的基 URI。

credentials
MicrosoftAppCredentials

Bot Connector 服务的凭据。

customHttpClient
HttpClient

要用于此连接器客户端的 HTTP 客户端。

addJwtTokenRefresher
Boolean

已弃用,请勿使用。

handlers
DelegatingHandler[]

可选,要添加到 HTTP 客户端管道的 对象的数组 DelegatingHandler

适用于

ConnectorClient(Uri, ServiceClientCredentials, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

可选。 服务的基 URI。

credentials
Microsoft.Rest.ServiceClientCredentials

必需。 唯一标识客户端订阅的订阅凭据。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委托处理程序。

例外

当所需参数为 null 时引发。

适用于

ConnectorClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

credentials
Microsoft.Rest.ServiceClientCredentials

必需。 唯一标识客户端订阅的订阅凭据。

rootHandler
HttpClientHandler

可选。 用于处理 http 传输的 http 客户端处理程序。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委托处理程序。

例外

当所需参数为 null 时引发。

适用于

ConnectorClient(ServiceClientCredentials, HttpClient, Boolean)

初始化 ConnectorClient 类的新实例。

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)

参数

credentials
Microsoft.Rest.ServiceClientCredentials

必需。 唯一标识客户端订阅的订阅凭据。

httpClient
HttpClient

要使用的 HttpClient。

disposeHttpClient
Boolean

True:将在调用 ConnectorClient.Dispose () 时释放提供的 httpClient。 False:不会释放提供的 httpClient。

例外

当所需的参数为 null 时引发。

适用于

ConnectorClient(Uri, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

可选。 服务的基 URI。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委派处理程序。

例外

当所需的参数为 null 时引发。

适用于

ConnectorClient(Uri, HttpClientHandler, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

baseUri
Uri

可选。 服务的基 URI。

rootHandler
HttpClientHandler

可选。 用于处理 http 传输的 http 客户端处理程序。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委派处理程序。

例外

当所需的参数为 null 时引发。

适用于

ConnectorClient(HttpClientHandler, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

rootHandler
HttpClientHandler

可选。 用于处理 http 传输的 http 客户端处理程序。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委派处理程序。

适用于

ConnectorClient(HttpClient, Boolean)

初始化 ConnectorClient 类的新实例。

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)

参数

httpClient
HttpClient

要使用的 HttpClient。

disposeHttpClient
Boolean

True:将在调用 ConnectorClient.Dispose () 时释放提供的 httpClient。 False:不会释放提供的 httpClient。

适用于

ConnectorClient(ServiceClientCredentials, DelegatingHandler[])

初始化 ConnectorClient 类的新实例。

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())

参数

credentials
Microsoft.Rest.ServiceClientCredentials

必需。 唯一标识客户端订阅的订阅凭据。

handlers
DelegatingHandler[]

可选。 要添加到 http 客户端管道的委派处理程序。

例外

当所需的参数为 null 时引发。

适用于