Language

KeyValueRouteBuilderBase<TBuilder> Class

Definition

Base builder for configuring task module routes that handle key-based Invoke activities in an AgentApplication. Supports matching the value of a named key field using either an exact string or a regular expression pattern, and ensures the route is properly configured for Invoke routing before building.

public class KeyValueRouteBuilderBase<TBuilder> : Microsoft.Agents.Builder.App.RouteBuilderBase<TBuilder> where TBuilder : KeyValueRouteBuilderBase<TBuilder>
type KeyValueRouteBuilderBase<'Builder (requires 'Builder :> KeyValueRouteBuilderBase<'Builder>)> = class
    inherit RouteBuilderBase<'Builder (requires 'Builder :> KeyValueRouteBuilderBase<'Builder>)>
Public Class KeyValueRouteBuilderBase(Of TBuilder)
Inherits RouteBuilderBase(Of TBuilder)

Type Parameters

TBuilder

The concrete builder type, used to enable fluent method chaining.

Inheritance
KeyValueRouteBuilderBase<TBuilder>
Derived

Constructors

Name Description
KeyValueRouteBuilderBase<TBuilder>()

Initializes a new instance of KeyValueRouteBuilderBase<TBuilder>, pre-configured as an Invoke route.

Fields

Name Description
_route (Inherited from RouteBuilderBase<TBuilder>)

Properties

Name Description
InvokeName

Methods

Name Description
AsAgentic(Boolean)

Configures the route to operate in agentic mode, enabling behaviors associated with agentic processing.

(Inherited from RouteBuilderBase<TBuilder>)
AsInvoke(Boolean)

Returns the current route builder instance configured for Invoke routing. This method ensures that the route remains set as an Invoke route.

AsNonTerminal()

Marks the current route as non-terminal and returns the updated builder instance.

(Inherited from RouteBuilderBase<TBuilder>)
Build()

Builds and returns the configured route instance after validating required components.

(Inherited from RouteBuilderBase<TBuilder>)
PreBuild()
WithChannelId(ChannelId)

Sets the channel identifier for the route and returns the builder instance for method chaining.

(Inherited from RouteBuilderBase<TBuilder>)
WithKey(String)

Sets the name of the key property in the incoming activity's value payload used for route matching. Defaults to "task".

WithOAuthHandlers(Func<ITurnContext,String[]>)

Configures OAuth handler functions for the route using the specified delegate.

(Inherited from RouteBuilderBase<TBuilder>)
WithOAuthHandlers(String)

Configures the builder to use one or more OAuth authentication handlers specified in a delimited string.

(Inherited from RouteBuilderBase<TBuilder>)
WithOAuthHandlers(String[])

Configures the route to use the specified OAuth authentication handlers.

(Inherited from RouteBuilderBase<TBuilder>)
WithOrderRank(UInt16)

Sets the order rank for the route and returns the current builder instance for further configuration.

(Inherited from RouteBuilderBase<TBuilder>)
WithSelector(RouteSelector)

Sets the route selector used to determine how incoming requests are matched to this route builder.

(Inherited from RouteBuilderBase<TBuilder>)
WithValue(Regex)

Match a specific task data value pattern.

WithValue(String)

Match a specific task data value.

Applies to