public bool Match(HttpRequestMessage request, IHttpRoute route, string parameterName,
     IDictionary<string, object> values, HttpRouteDirection routeDirection)
 {
     var versionFinder = new VersionFinder();
     var version = versionFinder.GetVersionFromRequest(request);
     return _version == version;
 }
        public bool Match(HttpRequestMessage request, IHttpRoute route, string parameterName,
                          IDictionary <string, object> values, HttpRouteDirection routeDirection)
        {
            var versionFinder = new VersionFinder();
            var version       = versionFinder.GetVersionFromRequest(request);

            return(_version == version);
        }
        public override string GetControllerName(HttpRequestMessage request)
        {
            var controllerName = base.GetControllerName(request);
            var versionFinder = new VersionFinder();
            var version = versionFinder.GetVersionFromRequest(request);

            if (version > 0)
            {
                return GetVersionedControllerName(request, controllerName, version);
            }

            return controllerName;
        }
예제 #4
0
        public override string GetControllerName(HttpRequestMessage request)
        {
            var controllerName = base.GetControllerName(request);
            var versionFinder  = new VersionFinder();
            var version        = versionFinder.GetVersionFromRequest(request);

            if (version > 0)
            {
                return(GetVersionedControllerName(request, controllerName, version));
            }

            return(controllerName);
        }