Sprog

AgentHostExtensions.AddAgentCore Method

Definition

Overloads

Name Description
AddAgentCore(IHostApplicationBuilder)

Adds the core agent services.

  • IConnections, which uses IConfiguration for settings.
  • IChannelServiceClientFactory for ConnectorClient and UserTokenClient creations.
  • CloudAdapter, this is the default adapter that works with Azure Bot Service and Activity Protocol Agents.
AddAgentCore(IHostApplicationBuilder, String, String)

Adds the core agent services using custom configuration section paths for connections and the connections map.

AddAgentCore<TAdapter>(IHostApplicationBuilder)

Adds the core agent services using a derived CloudAdapter.

  • IConnections, which uses IConfiguration for settings.
  • IChannelServiceClientFactory for ConnectorClient and UserTokenClient creations.
  • CloudAdapter, this is the default adapter that works with Azure Bot Service and Activity Protocol Agents.
AddAgentCore<TAdapter>(IHostApplicationBuilder, String, String)

Adds the core agent services using a derived CloudAdapter and custom configuration section paths for connections and the connections map.

AddAgentCore(IHostApplicationBuilder)

Adds the core agent services.

  • IConnections, which uses IConfiguration for settings.
  • IChannelServiceClientFactory for ConnectorClient and UserTokenClient creations.
  • CloudAdapter, this is the default adapter that works with Azure Bot Service and Activity Protocol Agents.
public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentCore(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder);
static member AddAgentCore : Microsoft.Extensions.Hosting.IHostApplicationBuilder -> Microsoft.Extensions.Hosting.IHostApplicationBuilder
<Extension()>
Public Function AddAgentCore (builder As IHostApplicationBuilder) As IHostApplicationBuilder

Parameters

Returns

The same instance of IHostApplicationBuilder to allow for method chaining.

Applies to

AddAgentCore(IHostApplicationBuilder, String, String)

Adds the core agent services using custom configuration section paths for connections and the connections map.

public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentCore(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string connectionsKey, string mapKey);
static member AddAgentCore : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string -> Microsoft.Extensions.Hosting.IHostApplicationBuilder
<Extension()>
Public Function AddAgentCore (builder As IHostApplicationBuilder, connectionsKey As String, mapKey As String) As IHostApplicationBuilder

Parameters

builder
IHostApplicationBuilder

The host application builder.

connectionsKey
String

The configuration section path containing connection definitions.

mapKey
String

The configuration section path containing the connections map.

Returns

The same instance of IHostApplicationBuilder to allow for method chaining.

Remarks

This method uses CloudAdapter and does not replace an existing IConnections registration. Call it before AddAgent when custom configuration section paths are required.

Applies to

AddAgentCore<TAdapter>(IHostApplicationBuilder)

Adds the core agent services using a derived CloudAdapter.

  • IConnections, which uses IConfiguration for settings.
  • IChannelServiceClientFactory for ConnectorClient and UserTokenClient creations.
  • CloudAdapter, this is the default adapter that works with Azure Bot Service and Activity Protocol Agents.
public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentCore<TAdapter>(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder) where TAdapter : Microsoft.Agents.Hosting.AspNetCore.CloudAdapter;
static member AddAgentCore : Microsoft.Extensions.Hosting.IHostApplicationBuilder -> Microsoft.Extensions.Hosting.IHostApplicationBuilder (requires 'Adapter :> Microsoft.Agents.Hosting.AspNetCore.CloudAdapter)
<Extension()>
Public Function AddAgentCore(Of TAdapter As CloudAdapter) (builder As IHostApplicationBuilder) As IHostApplicationBuilder

Type Parameters

TAdapter

Parameters

Returns

The same instance of IHostApplicationBuilder to allow for method chaining.

Applies to

AddAgentCore<TAdapter>(IHostApplicationBuilder, String, String)

Adds the core agent services using a derived CloudAdapter and custom configuration section paths for connections and the connections map.

public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentCore<TAdapter>(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string connectionsKey, string mapKey) where TAdapter : Microsoft.Agents.Hosting.AspNetCore.CloudAdapter;
static member AddAgentCore : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string -> Microsoft.Extensions.Hosting.IHostApplicationBuilder (requires 'Adapter :> Microsoft.Agents.Hosting.AspNetCore.CloudAdapter)
<Extension()>
Public Function AddAgentCore(Of TAdapter As CloudAdapter) (builder As IHostApplicationBuilder, connectionsKey As String, mapKey As String) As IHostApplicationBuilder

Type Parameters

TAdapter

The type of cloud adapter to register. Must inherit from CloudAdapter.

Parameters

builder
IHostApplicationBuilder

The host application builder.

connectionsKey
String

The configuration section path containing connection definitions.

mapKey
String

The configuration section path containing the connections map.

Returns

The same instance of IHostApplicationBuilder to allow for method chaining.

Remarks

This method does not replace an existing IConnections registration. Call it before AddAgent when custom configuration section paths are required.

Applies to