OAuthClient 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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[]
Optional. 委託處理程序加入 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
- credentials
- MicrosoftAppCredentials
- 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
Optional. 服務的基本 URI。
- rootHandler
- HttpClientHandler
Optional. 用來處理 HTTP 傳輸的 HTTP 用戶端處理器。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 HTTP 用戶端管線。
例外狀況
當所需參數為空時會拋出。
適用於
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
Optional. 服務的基本 URI。
- credentials
- Microsoft.Rest.ServiceClientCredentials
Required. 可唯一識別用戶端訂用帳戶的訂用帳戶認證。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 HTTP 用戶端管線。
例外狀況
當所需參數為空時會拋出。
適用於
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
Required. 可唯一識別用戶端訂用帳戶的訂用帳戶認證。
- rootHandler
- HttpClientHandler
Optional. 用來處理 HTTP 傳輸的 HTTP 用戶端處理器。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 HTTP 用戶端管線。
例外狀況
當所需參數為空時會拋出。
適用於
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
Optional. 服務的基本 URI。
- credentials
- Microsoft.Rest.ServiceClientCredentials
Required. 可唯一識別用戶端訂用帳戶的訂用帳戶認證。
- rootHandler
- HttpClientHandler
Optional. 用來處理 HTTP 傳輸的 HTTP 用戶端處理器。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 HTTP 用戶端管線。
例外狀況
當所需參數為空時會拋出。
適用於
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())
參數
- credentials
- MicrosoftAppCredentials
- 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
Optional. 服務的基本 URI。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 HTTP 用戶端管線。
例外狀況
當所需參數為空時會拋出。
適用於
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
Optional. 用來處理 HTTP 傳輸的 HTTP 用戶端處理器。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 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。 錯誤:不會處理提供的 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
Required. 可唯一識別用戶端訂用帳戶的訂用帳戶認證。
- handlers
- DelegatingHandler[]
Optional. 委託處理程序加入 HTTP 用戶端管線。
例外狀況
當所需參數為空時會拋出。
適用於
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
Required. 可唯一識別用戶端訂用帳戶的訂用帳戶認證。
- httpClient
- HttpClient
HttpClient 將被使用。
- disposeHttpClient
- Boolean
true: 會在呼叫 OAuthClient.Dispose() 時丟棄所提供的 httpClient。 錯誤:不會處理提供的 httpClient。
例外狀況
當所需參數為空時會拋出。