TypeRouteBuilderBase<TBuilder> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the generic base builder for routing activities by activity type in an AgentApplication.
public abstract class TypeRouteBuilderBase<TBuilder> : Microsoft.Agents.Builder.App.RouteBuilderBase<TBuilder> where TBuilder : TypeRouteBuilderBase<TBuilder>
type TypeRouteBuilderBase<'Builder (requires 'Builder :> TypeRouteBuilderBase<'Builder>)> = class
inherit RouteBuilderBase<'Builder (requires 'Builder :> TypeRouteBuilderBase<'Builder>)>
Public MustInherit Class TypeRouteBuilderBase(Of TBuilder)
Inherits RouteBuilderBase(Of TBuilder)
Type Parameters
- TBuilder
The concrete builder type returned from fluent members.
- Inheritance
- Derived
Remarks
Derive from TypeRouteBuilderBase<TBuilder> to create specialized type-based route builders while preserving fluent chaining on the concrete builder type. This base class supplies the shared activity type matching behavior, including string and regular expression filters, custom selectors, channel constraints, and agentic routing support. If neither WithType(String) nor WithType(Regex) is called, the route matches any activity type. Because this builder only filters on activity type, call AsInvoke(Boolean) when the route should be treated as an invoke route.
Constructors
| Name | Description |
|---|---|
| TypeRouteBuilderBase<TBuilder>() | |
Fields
| Name | Description |
|---|---|
| _route | (Inherited from RouteBuilderBase<TBuilder>) |
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) |
Flags the route for Invoke handling. (Inherited from RouteBuilderBase<TBuilder>) |
| 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>) |
| 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. |
| WithType(Regex) |
Configures the route to match activities whose type satisfies the specified regular expression pattern. |
| WithType(String) |
Configures the route to match activities of the specified type. |