你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AzureClientFactoryBuilder.UseCredential 方法

定义

重载

UseCredential(TokenCredential)

设置默认用于所有客户端的凭据。

UseCredential(Func<IServiceProvider,TokenCredential>)

设置默认用于所有客户端的凭据。

UseCredential(TokenCredential)

Source:
AzureClientFactoryBuilder.cs

设置默认用于所有客户端的凭据。

public Microsoft.Extensions.Azure.AzureClientFactoryBuilder UseCredential (Azure.Core.TokenCredential tokenCredential);
member this.UseCredential : Azure.Core.TokenCredential -> Microsoft.Extensions.Azure.AzureClientFactoryBuilder
Public Function UseCredential (tokenCredential As TokenCredential) As AzureClientFactoryBuilder

参数

tokenCredential
TokenCredential

要使用的凭据。

返回

此实例。

适用于

UseCredential(Func<IServiceProvider,TokenCredential>)

Source:
AzureClientFactoryBuilder.cs

设置默认用于所有客户端的凭据。

public Microsoft.Extensions.Azure.AzureClientFactoryBuilder UseCredential (Func<IServiceProvider,Azure.Core.TokenCredential> tokenCredentialFactory);
member this.UseCredential : Func<IServiceProvider, Azure.Core.TokenCredential> -> Microsoft.Extensions.Azure.AzureClientFactoryBuilder
Public Function UseCredential (tokenCredentialFactory As Func(Of IServiceProvider, TokenCredential)) As AzureClientFactoryBuilder

参数

tokenCredentialFactory
Func<IServiceProvider,TokenCredential>

要使用的凭据工厂。

返回

此实例。

适用于