示例#1
0
        /// <summary>
        /// Tries to parse provided string into <see cref="RoutePath"/>.
        /// </summary>
        /// <exception cref="ArgumentException">Route path is not provided</exception>
        public static bool TryParse(string path, out RoutePath routePath)
        {
            Route[] routes;
            var     succeeded = TryParseInternal(path, out routes);

            routePath = succeeded ? new RoutePath(routes) : null;
            return(succeeded);
        }
示例#2
0
        /// <summary>
        /// Concatenates two route paths returning new route path as a result.
        /// </summary>
        public RoutePath Concat(RoutePath other)
        {
            var dest = new Route[Routes.Length + other.Routes.Length];

            Array.Copy(Routes, dest, Routes.Length);
            Array.Copy(other.Routes, 0, dest, Routes.Length, other.Routes.Length);

            return(new RoutePath(dest));
        }
示例#3
0
 public static HttpService Delete <TReq, TRep>(RoutePath path, Service <TReq, TRep> responder)
     where TReq : IHttpRequest
     where TRep : IHttpResponse
 {
     throw new NotImplementedException();
 }