KestrunHostMapExtensions.AddMapRoute method (1 of 6)
Adds a route to the KestrunHost using the specified MapRouteOptions.
public static IEndpointConventionBuilder AddMapRoute(this KestrunHost host, MapRouteOptions options)
parameter | description |
---|---|
host | The KestrunHost instance. |
options | The MapRouteOptions containing route configuration. |
Return Value
An IEndpointConventionBuilder for further configuration.
See Also
- class KestrunHost
- record MapRouteOptions
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting
KestrunHostMapExtensions.AddMapRoute method (2 of 6)
Adds a native route to the KestrunHost using the specified MapRouteOptions and handler.
public static IEndpointConventionBuilder AddMapRoute(this KestrunHost host,
MapRouteOptions options, KestrunHandler handler)
parameter | description |
---|---|
host | The KestrunHost instance. |
options | The MapRouteOptions containing route configuration. |
handler | The handler to execute for the route. |
Return Value
An IEndpointConventionBuilder for further configuration.
See Also
- class KestrunHost
- record MapRouteOptions
- delegate KestrunHandler
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting
KestrunHostMapExtensions.AddMapRoute method (3 of 6)
Adds a native route to the KestrunHost for the specified pattern and HTTP verb.
public static IEndpointConventionBuilder AddMapRoute(this KestrunHost host, string pattern,
HttpVerb httpVerb, KestrunHandler handler, string[]? requireSchemes = null)
parameter | description |
---|---|
host | The KestrunHost instance. |
pattern | The route pattern. |
httpVerb | The HTTP verb for the route. |
handler | The handler to execute for the route. |
requireSchemes | Optional array of authorization schemes required for the route. |
Return Value
An IEndpointConventionBuilder for further configuration.
See Also
- class KestrunHost
- enum HttpVerb
- delegate KestrunHandler
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting
KestrunHostMapExtensions.AddMapRoute method (4 of 6)
Adds a native route to the KestrunHost for the specified pattern and HTTP verbs.
public static IEndpointConventionBuilder AddMapRoute(this KestrunHost host, string pattern,
IEnumerable<HttpVerb> httpVerbs, KestrunHandler handler, string[]? requireSchemes = null)
parameter | description |
---|---|
host | The KestrunHost instance. |
pattern | The route pattern. |
httpVerbs | The HTTP verbs for the route. |
handler | The handler to execute for the route. |
requireSchemes | Optional array of authorization schemes required for the route. |
Return Value
An IEndpointConventionBuilder for further configuration.
See Also
- class KestrunHost
- enum HttpVerb
- delegate KestrunHandler
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting
KestrunHostMapExtensions.AddMapRoute method (5 of 6)
Adds a route to the KestrunHost that executes a script block for the specified HTTP verb and pattern.
public static IEndpointConventionBuilder AddMapRoute(this KestrunHost host, string pattern,
HttpVerb httpVerbs, string scriptBlock, ScriptLanguage language = ScriptLanguage.PowerShell,
string[]? requireSchemes = null, Dictionary<string, object?>? arguments = null)
parameter | description |
---|---|
host | The KestrunHost instance. |
pattern | The route pattern. |
httpVerbs | The HTTP verb for the route. |
scriptBlock | The script block to execute. |
language | The scripting language to use (default is PowerShell). |
requireSchemes | Optional array of authorization schemes required for the route. |
arguments | Optional dictionary of arguments to pass to the script. |
Return Value
An IEndpointConventionBuilder for further configuration.
See Also
- class KestrunHost
- enum HttpVerb
- enum ScriptLanguage
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting
KestrunHostMapExtensions.AddMapRoute method (6 of 6)
Adds a route to the KestrunHost that executes a script block for the specified HTTP verbs and pattern.
public static IEndpointConventionBuilder AddMapRoute(this KestrunHost host, string pattern,
IEnumerable<HttpVerb> httpVerbs, string scriptBlock,
ScriptLanguage language = ScriptLanguage.PowerShell, string[]? requireSchemes = null,
Dictionary<string, object?>? arguments = null)
parameter | description |
---|---|
host | The KestrunHost instance. |
pattern | The route pattern. |
httpVerbs | The HTTP verbs for the route. |
scriptBlock | The script block to execute. |
language | The scripting language to use (default is PowerShell). |
requireSchemes | Optional array of authorization schemes required for the route. |
arguments | Optional dictionary of arguments to pass to the script. |
Return Value
An IEndpointConventionBuilder for further configuration.
See Also
- class KestrunHost
- enum HttpVerb
- enum ScriptLanguage
- class KestrunHostMapExtensions
- namespace Kestrun.Hosting