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

CredentialResolver.TryResolve Method

Definition

Attempts to construct an AuthenticationTokenProvider for the supplied credential configuration section.

public abstract bool TryResolve(Microsoft.Extensions.Configuration.IConfigurationSection credentialSection, out System.ClientModel.AuthenticationTokenProvider? provider);
abstract member TryResolve : Microsoft.Extensions.Configuration.IConfigurationSection * AuthenticationTokenProvider -> bool
Public MustOverride Function TryResolve (credentialSection As IConfigurationSection, ByRef provider As AuthenticationTokenProvider) As Boolean

Parameters

credentialSection
IConfigurationSection

The credential configuration section (post-overlay if any overrides were applied by the caller).

provider
AuthenticationTokenProvider

When this method returns true, contains the constructed provider; otherwise null.

Returns

true if this resolver recognized and handled the section; false to defer to the next resolver in the chain.

Applies to