AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

GenericHandlerRoute<(Of <(<'T>)>)> Class

A route that maps a URL pattern to an IHttpHandler of type T, enabling ASP.NET routing integration for custom HTTP handlers. Implements the AdvantageHandler

Namespace:  AdvantageCMS.Core.Common.BaseClasses.Handler
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public class GenericHandlerRoute<T> : AdvantageHandler
where T : IHttpHandler

Type Parameters

T
The IHttpHandler type to instantiate when the route matches.

Examples


Register a custom handler route during application startup (e.g., in Global.asax):
C#
protected void Application_Start(object sender, EventArgs e)
{
    // Map the "api/products" URL pattern to the ProductHandler
    RouteTable.Routes.Add(new GenericHandlerRoute<ProductHandler>("api/products"));

    // Multiple routes can be registered for different handlers
    RouteTable.Routes.Add(new GenericHandlerRoute<OrderHandler>("api/orders"));
}

Inheritance Hierarchy


Object
  RouteBase
    AdvantageCMS.Core.Common.BaseClasses.Handler..::..AdvantageHandler
      AdvantageCMS.Core.Common.BaseClasses.Handler..::..GenericHandlerRoute<(Of <(<'T>)>)>