SplatDev.Routing
2.0.0
dotnet add package SplatDev.Routing --version 2.0.0
NuGet\Install-Package SplatDev.Routing -Version 2.0.0
<PackageReference Include="SplatDev.Routing" Version="2.0.0" />
<PackageVersion Include="SplatDev.Routing" Version="2.0.0" />
<PackageReference Include="SplatDev.Routing" />
paket add SplatDev.Routing --version 2.0.0
#r "nuget: SplatDev.Routing, 2.0.0"
#:package SplatDev.Routing@2.0.0
#addin nuget:?package=SplatDev.Routing&version=2.0.0
#tool nuget:?package=SplatDev.Routing&version=2.0.0
SplatDev.Routing
Convention-based route registration helpers for ASP.NET Core applications.
What it provides
IRoute — interface for declaring conventional MVC routes:
RouteAlias— unique route nameUrl— route pattern (must not start with/)Controller— target controller nameAction— target action nameDefaults— optional route defaults (anonymous object)
IUmbracoPluginRoute — extends
IRoutewith Umbraco-specific metadata:RootId— Umbraco content node root IDRootAlias— Umbraco content node root aliasIsPluginController— marks the route as a plugin controller
RouteServiceExtensions.MapSplatDevRoutes — scans caller-provided assemblies for
IRouteimplementations and registers each as a conventional MVC route. UsesActivatorUtilities.CreateInstancefor DI support on route ctors.
Install
dotnet add package SplatDev.Routing
Usage
// 1. Implement IRoute
public class HomeRoute : IRoute
{
public string RouteAlias => "home";
public string Url => "";
public string Controller => "Home";
public string Action => "Index";
public object Defaults => null;
}
// 2. Register in Program.cs / Startup.cs
app.UseEndpoints(endpoints =>
{
endpoints.MapSplatDevRoutes(typeof(HomeRoute).Assembly);
});
For Umbraco plugin routes, implement IUmbracoPluginRoute : IRoute instead.
Limitations
- Routes must be registered via the
Microsoft.AspNetCore.Mvcpipeline (MapControllerRoute). - All-assemblies scan is not supported — callers must explicitly provide the target assemblies.
Design decisions
- Interface split (v1.1.0):
RootId,RootAlias, andIsPluginControllerwere moved fromIRoutetoIUmbracoPluginRoute : IRouteto keep the base interface free of Umbraco-specific fields. - DI on ctors:
Activator.CreateInstancewas replaced withActivatorUtilities.CreateInstance(requiresIServiceProviderfromIEndpointRouteBuilder).
Target frameworks
| Framework |
|---|
| net8.0 |
| net10.0 |
SplatDev.Routing — part of the SplatDev.Umbraco.Plugins suite. Licensed under MIT. © SplatDev Ltda.
Changelog
2.0.0 — 2026-08-25
Breaking. RootId, RootAlias and IsPluginController move off IRoute and onto a new IUmbracoPluginRoute : IRoute. They only ever meant anything for routes served by an Umbraco plugin controller, but sat on the base interface, so every route had to implement three members it did not use. A route that needs them now implements IUmbracoPluginRoute; one that does not is unchanged apart from dropping the three stubs.
Route discovery is unaffected — MapSplatDevRoutes scans for IRoute, and IUmbracoPluginRoute derives from it, so both kinds are still found.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 100 | 8/25/2026 |