Language

BlocklistClientHostExtensions.AddBlocklistClient Method

Definition

Overloads

AddBlocklistClient(IHostApplicationBuilder, String)

Source:
BlocklistClientHostExtensions.cs

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

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

Parameters

sectionName
String

The section of IConfiguration to use.

Returns

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

Applies to

AddBlocklistClient(IHostApplicationBuilder, String, Action<BlocklistClientSettings>)

Source:
BlocklistClientHostExtensions.cs

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

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

Parameters

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