TypeRouteBuilderBase<TBuilder>.WithType 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.
Overloads
| Name | Description |
|---|---|
| WithType(String) |
Configures the route to match activities of the specified type. |
| 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.
public TBuilder WithType(string type);
member this.WithType : string -> 'Builder
Public Function WithType (type As String) As TBuilder
Parameters
- type
- String
The activity type to match. Cannot be null or empty.
Returns
The current builder instance with the added selector for matching Type.
Remarks
This method updates the route selector to filter activities based on the provided type. If the route is marked as agentic, only agentic requests will be considered for matching.
Applies to
WithType(Regex)
Configures the route to match activities whose type satisfies the specified regular expression pattern.
public TBuilder WithType(System.Text.RegularExpressions.Regex typePattern);
member this.WithType : System.Text.RegularExpressions.Regex -> 'Builder
Public Function WithType (typePattern As Regex) As TBuilder
Parameters
- typePattern
- Regex
A regular expression used to determine whether the activity type should be matched by the route. Cannot be null.
Returns
The current builder instance configured with the specified Type pattern selector.
Remarks
This method updates the route's selector to only match activities whose type matches the provided pattern. If the route is marked as agentic, it will also require the request to be agentic for the selector to return true.