InvokeRouteBuilder.WithSelector(RouteSelector) Method
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.
Sets a custom route selector used to determine how incoming requests are matched to this route builder.
public override Microsoft.Agents.Builder.App.InvokeRouteBuilder WithSelector(Microsoft.Agents.Builder.App.RouteSelector selector);
override this.WithSelector : Microsoft.Agents.Builder.App.RouteSelector -> Microsoft.Agents.Builder.App.InvokeRouteBuilder
Public Overrides Function WithSelector (selector As RouteSelector) As InvokeRouteBuilder
Parameters
- selector
- RouteSelector
The route selector that defines the criteria for matching requests to the route. The supplied selector does not need to validate base route properties like ChannelId, Agentic, etc. An Activity type of "invoke" is enforced.
Returns
The current instance of InvokeRouteBuilder with the specified selector applied.
Remarks
Use this method to customize the matching logic for routes. This allows for advanced routing scenarios where requests are selected based on custom rules or patterns. If WithName was also called, this selector is in addition to the Name selector.