AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

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

Route handler that creates new instances of T to service matched routes. Implements the IRouteHandler

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

Syntax


public class GenericHandlerRouteHandler<T> : IRouteHandler
where T : IHttpHandler

Type Parameters

T
The IHttpHandler type to instantiate for each request.

Examples


GenericHandlerRouteHandler<T> is used internally by GenericHandlerRoute<(Of <(<'T>)>)> to create handler instances. In most cases you do not instantiate it directly; it is wired automatically when a route matches:
C#
// Inside GenericHandlerRoute<T>.GetRouteData:
var routeHandler = new GenericHandlerRouteHandler<ProductHandler>();
RouteData rdata = new RouteData(this, routeHandler);
// The ASP.NET pipeline then calls routeHandler.GetHttpHandler(requestContext)
// to obtain a new ProductHandler instance for the request.

Inheritance Hierarchy


Object
  AdvantageCMS.Core.Common.BaseClasses.Handler..::..GenericHandlerRouteHandler<(Of <(<'T>)>)>