public static void RegisterRoute <TController>(
     this IExpressiveRouter router,
     HttpMethod?method,
     string domain,
     string path)
     where TController : IRenderingController
 {
     if (method.HasValue)
     {
         router.Register(path).OnDomain(domain).WithMethod(method.Value).ToController <TController>();
     }
     else
     {
         router.Register(path).OnDomain(domain).ToController <TController>();
     }
 }
 public static void RegisterRoute <TController>(
     this IExpressiveRouter router,
     HttpMethod?method,
     string domain,
     string path,
     Expression <Func <TController, IHttpContext, List <PositionedResult>, IResult> > func)
     where TController : IRenderingController
 {
     if (method.HasValue)
     {
         router.Register(path).OnDomain(domain).WithMethod(method.Value)
         .To <TController>()
         .Method(func);
     }
     else
     {
         router.Register(path)
         .OnDomain(domain)
         .To <TController>()
         .Method(func);
     }
 }