Compartilhar via


AzureClientBuilderExtensions.WithCredential Método

Definição

Sobrecargas

WithCredential<TClient,TOptions>(IAzureClientBuilder<TClient,TOptions>, TokenCredential)

Defina a credencial a ser usada para este registro de cliente.

WithCredential<TClient,TOptions>(IAzureClientBuilder<TClient,TOptions>, Func<IServiceProvider,TokenCredential>)

Defina a fábrica de credenciais a ser usada para esse registro de cliente.

WithCredential<TClient,TOptions>(IAzureClientBuilder<TClient,TOptions>, TokenCredential)

Origem:
AzureClientBuilderExtensions.cs

Defina a credencial a ser usada para este registro de cliente.

public static Azure.Core.Extensions.IAzureClientBuilder<TClient,TOptions> WithCredential<TClient,TOptions> (this Azure.Core.Extensions.IAzureClientBuilder<TClient,TOptions> builder, Azure.Core.TokenCredential credential) where TOptions : class;
static member WithCredential : Azure.Core.Extensions.IAzureClientBuilder<'Client, 'Options (requires 'Options : null)> * Azure.Core.TokenCredential -> Azure.Core.Extensions.IAzureClientBuilder<'Client, 'Options (requires 'Options : null)> (requires 'Options : null)
<Extension()>
Public Function WithCredential(Of TClient, TOptions) (builder As IAzureClientBuilder(Of TClient, TOptions), credential As TokenCredential) As IAzureClientBuilder(Of TClient, TOptions)

Parâmetros de tipo

TClient

O tipo do cliente.

TOptions

O tipo de opções que o cliente usa.

Parâmetros

builder
IAzureClientBuilder<TClient,TOptions>

A instância do construtor de clientes.

credential
TokenCredential

A credencial a ser usada.

Retornos

A instância do construtor de clientes.

Aplica-se a

WithCredential<TClient,TOptions>(IAzureClientBuilder<TClient,TOptions>, Func<IServiceProvider,TokenCredential>)

Origem:
AzureClientBuilderExtensions.cs

Defina a fábrica de credenciais a ser usada para esse registro de cliente.

public static Azure.Core.Extensions.IAzureClientBuilder<TClient,TOptions> WithCredential<TClient,TOptions> (this Azure.Core.Extensions.IAzureClientBuilder<TClient,TOptions> builder, Func<IServiceProvider,Azure.Core.TokenCredential> credentialFactory) where TOptions : class;
static member WithCredential : Azure.Core.Extensions.IAzureClientBuilder<'Client, 'Options (requires 'Options : null)> * Func<IServiceProvider, Azure.Core.TokenCredential> -> Azure.Core.Extensions.IAzureClientBuilder<'Client, 'Options (requires 'Options : null)> (requires 'Options : null)
<Extension()>
Public Function WithCredential(Of TClient, TOptions) (builder As IAzureClientBuilder(Of TClient, TOptions), credentialFactory As Func(Of IServiceProvider, TokenCredential)) As IAzureClientBuilder(Of TClient, TOptions)

Parâmetros de tipo

TClient

O tipo do cliente.

TOptions

O tipo de opções que o cliente usa.

Parâmetros

builder
IAzureClientBuilder<TClient,TOptions>

A instância do construtor de clientes.

credentialFactory
Func<IServiceProvider,TokenCredential>

A fábrica de credenciais a ser usada.

Retornos

A instância do construtor de clientes.

Aplica-se a