OAuthClient 构造函数

定义

重载

OAuthClient(DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

初始化 OAuthClient 类的新实例。

OAuthClient(Uri, ServiceClientCredentials, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

OAuthClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

初始化 OAuthClient 类的新实例。

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

初始化 OAuthClient 类的新实例。

OAuthClient(HttpClientHandler, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

OAuthClient(HttpClient, Boolean)

初始化 OAuthClient 类的新实例。

OAuthClient(ServiceClientCredentials, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

OAuthClient(ServiceClientCredentials, HttpClient, Boolean)

初始化 OAuthClient 类的新实例。

OAuthClient(DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

参数

handlers
DelegatingHandler[]

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

适用于

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

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

参数

baseUri
Uri
microsoftAppId
String
microsoftAppPassword
String
handlers
DelegatingHandler[]

适用于

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

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

参数

baseUri
Uri
addJwtTokenRefresher
Boolean
handlers
DelegatingHandler[]

适用于

OAuthClient(Uri, HttpClientHandler, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

参数

baseUri
Uri

可选。 服务的基 URI。

rootHandler
HttpClientHandler

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

handlers
DelegatingHandler[]

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

例外

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

适用于

OAuthClient(Uri, ServiceClientCredentials, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

参数

baseUri
Uri

可选。 服务的基 URI。

credentials
Microsoft.Rest.ServiceClientCredentials

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

handlers
DelegatingHandler[]

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

例外

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

适用于

OAuthClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

public OAuthClient (Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.OAuthClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.OAuthClient
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 时引发。

适用于

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

初始化 OAuthClient 类的新实例。

public OAuthClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Bot.Connector.OAuthClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Bot.Connector.OAuthClient
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 时引发。

适用于

OAuthClient(MicrosoftAppCredentials, Boolean, DelegatingHandler[])

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

参数

addJwtTokenRefresher
Boolean
handlers
DelegatingHandler[]

适用于

OAuthClient(Uri, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

参数

baseUri
Uri

可选。 服务的基 URI。

handlers
DelegatingHandler[]

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

例外

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

适用于

OAuthClient(HttpClientHandler, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

参数

rootHandler
HttpClientHandler

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

handlers
DelegatingHandler[]

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

适用于

OAuthClient(HttpClient, Boolean)

初始化 OAuthClient 类的新实例。

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

参数

httpClient
HttpClient

要使用的 HttpClient。

disposeHttpClient
Boolean

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

适用于

OAuthClient(ServiceClientCredentials, DelegatingHandler[])

初始化 OAuthClient 类的新实例。

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

参数

credentials
Microsoft.Rest.ServiceClientCredentials

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

handlers
DelegatingHandler[]

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

例外

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

适用于

OAuthClient(ServiceClientCredentials, HttpClient, Boolean)

初始化 OAuthClient 类的新实例。

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

参数

credentials
Microsoft.Rest.ServiceClientCredentials

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

httpClient
HttpClient

要使用的 HttpClient。

disposeHttpClient
Boolean

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

例外

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

适用于