Share via


RazorPagesEndpointRouteBuilderExtensions.MapDynamicPageRoute Method

Definition

Overloads

MapDynamicPageRoute<TTransformer>(IEndpointRouteBuilder, String)

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will attempt to select a page using the route values produced by TTransformer.

MapDynamicPageRoute<TTransformer>(IEndpointRouteBuilder, String, Object)

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will attempt to select a page using the route values produced by TTransformer.

MapDynamicPageRoute<TTransformer>(IEndpointRouteBuilder, String, Object, Int32)

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will attempt to select a page using the route values produced by TTransformer.

MapDynamicPageRoute<TTransformer>(IEndpointRouteBuilder, String)

Source:
RazorPagesEndpointRouteBuilderExtensions.cs

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will attempt to select a page using the route values produced by TTransformer.

public:
generic <typename TTransformer>
 where TTransformer : Microsoft::AspNetCore::Mvc::Routing::DynamicRouteValueTransformer[System::Runtime::CompilerServices::Extension]
 static void MapDynamicPageRoute(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern);
public static void MapDynamicPageRoute<TTransformer> (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer;
static member MapDynamicPageRoute : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string -> unit (requires 'ransformer :> Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer)
<Extension()>
Public Sub MapDynamicPageRoute(Of TTransformer As DynamicRouteValueTransformer) (endpoints As IEndpointRouteBuilder, pattern As String)

Type Parameters

TTransformer

The type of a DynamicRouteValueTransformer.

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

pattern
String

The URL pattern of the route.

Remarks

This method allows the registration of a RouteEndpoint and DynamicRouteValueTransformer that combine to dynamically select a page using custom logic.

The instance of TTransformer will be retrieved from the dependency injection container. Register TTransformer with the desired service lifetime in ConfigureServices.

Applies to

MapDynamicPageRoute<TTransformer>(IEndpointRouteBuilder, String, Object)

Source:
RazorPagesEndpointRouteBuilderExtensions.cs

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will attempt to select a page using the route values produced by TTransformer.

public:
generic <typename TTransformer>
 where TTransformer : Microsoft::AspNetCore::Mvc::Routing::DynamicRouteValueTransformer[System::Runtime::CompilerServices::Extension]
 static void MapDynamicPageRoute(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, System::Object ^ state);
public static void MapDynamicPageRoute<TTransformer> (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object state) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer;
public static void MapDynamicPageRoute<TTransformer> (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object? state) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer;
static member MapDynamicPageRoute : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * obj -> unit (requires 'ransformer :> Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer)
<Extension()>
Public Sub MapDynamicPageRoute(Of TTransformer As DynamicRouteValueTransformer) (endpoints As IEndpointRouteBuilder, pattern As String, state As Object)

Type Parameters

TTransformer

The type of a DynamicRouteValueTransformer.

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

pattern
String

The URL pattern of the route.

state
Object

A state object to provide to the TTransformer instance.

Remarks

This method allows the registration of a RouteEndpoint and DynamicRouteValueTransformer that combine to dynamically select a page using custom logic.

The instance of TTransformer will be retrieved from the dependency injection container. Register TTransformer with the desired service lifetime in ConfigureServices.

Applies to

MapDynamicPageRoute<TTransformer>(IEndpointRouteBuilder, String, Object, Int32)

Source:
RazorPagesEndpointRouteBuilderExtensions.cs

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will attempt to select a page using the route values produced by TTransformer.

public:
generic <typename TTransformer>
 where TTransformer : Microsoft::AspNetCore::Mvc::Routing::DynamicRouteValueTransformer[System::Runtime::CompilerServices::Extension]
 static void MapDynamicPageRoute(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, System::Object ^ state, int order);
public static void MapDynamicPageRoute<TTransformer> (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object state, int order) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer;
static member MapDynamicPageRoute : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * obj * int -> unit (requires 'ransformer :> Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer)
<Extension()>
Public Sub MapDynamicPageRoute(Of TTransformer As DynamicRouteValueTransformer) (endpoints As IEndpointRouteBuilder, pattern As String, state As Object, order As Integer)

Type Parameters

TTransformer

The type of a DynamicRouteValueTransformer.

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

pattern
String

The URL pattern of the route.

state
Object

A state object to provide to the TTransformer instance.

order
Int32

The matching order for the dynamic route.

Remarks

This method allows the registration of a RouteEndpoint and DynamicRouteValueTransformer that combine to dynamically select a page using custom logic.

The instance of TTransformer will be retrieved from the dependency injection container. Register TTransformer with the desired service lifetime in ConfigureServices.

Applies to