SearchRouteAttribute 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.
Attribute to define a route that handles Adaptive Card dynamic search (application/search) invoke
activities, optionally matching a specific dataset or dataset pattern.
[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.SearchHandler))]
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
public class SearchRouteAttribute : Attribute, Microsoft.Agents.Builder.App.IRouteAttribute
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.SearchHandler))>]
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)>]
type SearchRouteAttribute = class
inherit Attribute
interface IRouteAttribute
Public Class SearchRouteAttribute
Inherits Attribute
Implements IRouteAttribute
- Inheritance
-
SearchRouteAttribute
- Attributes
- Implements
Remarks
Decorate a method with this attribute to register it as a handler for Adaptive Card search events. Provide dataset for an exact match, datasetRegex for a pattern match, or neither to match any dataset. dataset and datasetRegex are mutually exclusive. The method must match the SearchHandler delegate signature.
[SearchRoute("npm")]
public async Task<IList<AdaptiveCardsSearchResult>> OnNpmSearchAsync(ITurnContext turnContext, ITurnState turnState, Query<AdaptiveCardsSearchParams> query, CancellationToken cancellationToken)
{
// Handle search for dataset "npm"
}
Constructors
| Name | Description |
|---|---|
| SearchRouteAttribute(String, String, Boolean, UInt16, String) |
Attribute to define a route that handles Adaptive Card dynamic search ( |
Methods
| Name | Description |
|---|---|
| AddRoute(AgentApplication, MethodInfo) | |