public Route(string routeUrl, FrankRouteHandler routeHandler, HttpMethod method) { string regex = new Regex(@"{(\w+)}").Replace(routeUrl, m => FormatRouteParameter(m.Groups[1].Value)); _routeRegex = new Regex("^" + regex + "$"); RouteHandler = routeHandler; Method = method; }
public Route(Regex routeRegex, FrankRouteHandler routeHandler, HttpMethod method) { _routeRegex = routeRegex; RouteHandler = routeHandler; Method = method; }