Udostępnij za pośrednictwem


AzureClientBuilderExtensions.WithCredential Method

Definition

Overloads

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

Set the credential to use for this client registration.

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

Set the credential factory to use for this client registration.

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

Source:
AzureClientBuilderExtensions.cs

Set the credential to use for this client registration.

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)

Type Parameters

TClient

The type of the client.

TOptions

The options type the client uses.

Parameters

builder
IAzureClientBuilder<TClient,TOptions>

The client builder instance.

credential
TokenCredential

The credential to use.

Returns

The client builder instance.

Applies to

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

Source:
AzureClientBuilderExtensions.cs

Set the credential factory to use for this client registration.

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)

Type Parameters

TClient

The type of the client.

TOptions

The options type the client uses.

Parameters

builder
IAzureClientBuilder<TClient,TOptions>

The client builder instance.

credentialFactory
Func<IServiceProvider,TokenCredential>

The credential factory to use.

Returns

The client builder instance.

Applies to