Class NanoRouteQueryExtensions
Adds query-parameter binding helpers to NanoRoute.
Inherited Members
Namespace: NanoRoute
Assembly: NanoRoute.dll
Syntax
public static class NanoRouteQueryExtensions
Methods
AddQueryBindings<TBuilder>(TBuilder, IEnumerable<string>, string)
Parses configured query parameters and stores their values in Parameters.
Declaration
public static TBuilder AddQueryBindings<TBuilder>(this TBuilder routeBuilder, IEnumerable<string> verbs, string bindings) where TBuilder : notnull, RouteBuilder
Parameters
| Type | Name | Description |
|---|---|---|
| TBuilder | routeBuilder | |
| IEnumerable<string> | verbs | The HTTP methods that activate the query-binding middleware. |
| string | bindings | A query-parameter descriptor such as |
Returns
| Type | Description |
|---|---|
| TBuilder | The current |
Type Parameters
| Name | Description |
|---|---|
| TBuilder |
Remarks
Parsed query values are written into Parameters. If that dictionary already contains the same key because of route binding, JSON binding, or earlier middleware, the query binding overwrites the existing value.
AddQueryBindings<TBuilder>(TBuilder, IEnumerable<string>, string, string)
Parses configured query parameters and stores their values in Parameters.
Declaration
public static TBuilder AddQueryBindings<TBuilder>(this TBuilder routeBuilder, IEnumerable<string> verbs, string pattern, string bindings) where TBuilder : notnull, RouteBuilder
Parameters
| Type | Name | Description |
|---|---|---|
| TBuilder | routeBuilder | |
| IEnumerable<string> | verbs | The HTTP methods that activate the query-binding middleware. |
| string | pattern | The route pattern where the query-binding middleware should be inserted. Use |
| string | bindings | A query-parameter descriptor such as |
Returns
| Type | Description |
|---|---|
| TBuilder | The current |
Type Parameters
| Name | Description |
|---|---|
| TBuilder |
Remarks
Parsed query values are written into Parameters. If that dictionary already contains the same key because of route binding, JSON binding, or earlier middleware, the query binding overwrites the existing value.
AddQueryBindings<TBuilder>(TBuilder, string)
Parses configured query parameters and stores their values in Parameters.
Declaration
public static TBuilder AddQueryBindings<TBuilder>(this TBuilder routeBuilder, string bindings) where TBuilder : notnull, RouteBuilder
Parameters
| Type | Name | Description |
|---|---|---|
| TBuilder | routeBuilder | |
| string | bindings | A query-parameter descriptor such as |
Returns
| Type | Description |
|---|---|
| TBuilder | The current |
Type Parameters
| Name | Description |
|---|---|
| TBuilder |
Remarks
Parsed query values are written into Parameters. If that dictionary already contains the same key because of route binding, JSON binding, or earlier middleware, the query binding overwrites the existing value.
AddQueryBindings<TBuilder>(TBuilder, string, string)
Parses configured query parameters and stores their values in Parameters.
Declaration
public static TBuilder AddQueryBindings<TBuilder>(this TBuilder routeBuilder, string pattern, string bindings) where TBuilder : notnull, RouteBuilder
Parameters
| Type | Name | Description |
|---|---|---|
| TBuilder | routeBuilder | |
| string | pattern | The route pattern where the query-binding middleware should be inserted. Use |
| string | bindings | A query-parameter descriptor such as |
Returns
| Type | Description |
|---|---|
| TBuilder | The current |
Type Parameters
| Name | Description |
|---|---|
| TBuilder |
Remarks
Parsed query values are written into Parameters. If that dictionary already contains the same key because of route binding, JSON binding, or earlier middleware, the query binding overwrites the existing value.
AddQueryBindings<TBuilder>(TBuilder, string, string, string)
Parses configured query parameters and stores their values in Parameters.
Declaration
public static TBuilder AddQueryBindings<TBuilder>(this TBuilder routeBuilder, string verb, string pattern, string bindings) where TBuilder : notnull, RouteBuilder
Parameters
| Type | Name | Description |
|---|---|---|
| TBuilder | routeBuilder | |
| string | verb | The HTTP method that activates the query-binding middleware. |
| string | pattern | The route pattern where the query-binding middleware should be inserted. Use |
| string | bindings | A query-parameter descriptor such as |
Returns
| Type | Description |
|---|---|
| TBuilder | The current |
Type Parameters
| Name | Description |
|---|---|
| TBuilder |
Remarks
Parsed query values are written into Parameters. If that dictionary already contains the same key because of route binding, JSON binding, or earlier middleware, the query binding overwrites the existing value.