# PrefixRoute constructor

Kind: Constructor  
Namespace: `Sisk.Core.Routing`  
Assembly: `Sisk.Core.dll`  
Source: https://docs.sisk-framework.org/api/Sisk.Core.Routing.PrefixRoute.-ctor.html

## PrefixRoute(RouteMethod, string, string?, RouteAction, IRequestHandler[]?) {#Sisk_Core_Routing_PrefixRoute__ctor_Sisk_Core_Routing_RouteMethod_System_String_System_String_Sisk_Core_Routing_RouteAction_Sisk_Core_Routing_IRequestHandler___}

Initializes a new instance of the [PrefixRoute](https://docs.sisk-framework.org/api/Sisk.Core.Routing.PrefixRoute.md) class.

```csharp
public PrefixRoute(RouteMethod method, string prefix, string? name, RouteAction action, IRequestHandler[]? beforeCallback)
```

### Parameters

`method` [RouteMethod](https://docs.sisk-framework.org/api/Sisk.Core.Routing.RouteMethod.md)

The HTTP method for this route.

`prefix` [string](https://learn.microsoft.com/dotnet/api/system.string)

The path prefix for this route.

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)?

The name of this route.

`action` [RouteAction](https://docs.sisk-framework.org/api/Sisk.Core.Routing.RouteAction.md)

The action to be executed when this route is matched.

`beforeCallback` [IRequestHandler](https://docs.sisk-framework.org/api/Sisk.Core.Routing.IRequestHandler.md)\[\]?

The callback to be executed before the action.
