Language

BlocklistClientHostExtensions.AddKeyedBlocklistClient Method

Definition

Overloads

AddKeyedBlocklistClient(IHostApplicationBuilder, String, String)

Source:
BlocklistClientHostExtensions.cs

Adds a keyed singleton BlocklistClient to the IHostApplicationBuilder's service collection.

public static System.ClientModel.Primitives.IClientBuilder AddKeyedBlocklistClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string key, string sectionName);
static member AddKeyedBlocklistClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string -> System.ClientModel.Primitives.IClientBuilder
<Extension()>
Public Function AddKeyedBlocklistClient (host As IHostApplicationBuilder, key As String, sectionName As String) As IClientBuilder

Parameters

key
String

The unique key to register as.

sectionName
String

The section of IConfiguration to use.

Returns

An IClientBuilder that can be used to further configure the client.

Applies to

AddKeyedBlocklistClient(IHostApplicationBuilder, String, String, Action<BlocklistClientSettings>)

Source:
BlocklistClientHostExtensions.cs

Adds a keyed singleton BlocklistClient to the IHostApplicationBuilder's service collection.

public static System.ClientModel.Primitives.IClientBuilder AddKeyedBlocklistClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string key, string sectionName, Action<Azure.AI.ContentSafety.BlocklistClientSettings> configureSettings);
static member AddKeyedBlocklistClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string * Action<Azure.AI.ContentSafety.BlocklistClientSettings> -> System.ClientModel.Primitives.IClientBuilder
<Extension()>
Public Function AddKeyedBlocklistClient (host As IHostApplicationBuilder, key As String, sectionName As String, configureSettings As Action(Of BlocklistClientSettings)) As IClientBuilder

Parameters

key
String

The unique key to register as.

sectionName
String

The section of IConfiguration to use.

configureSettings
Action<BlocklistClientSettings>

Factory method to modify the BlocklistClientSettings after they are created.

Returns

An IClientBuilder that can be used to further configure the client.

Applies to