public string SelectController(ODataPath odataPath, HttpRequestMessage request) { var controller = _delegateRoutingConvention.SelectController(odataPath, request); return(string.Equals(controller, _controllerAlias, StringComparison.OrdinalIgnoreCase) ? _targetControllerName : controller); }
/// <summary> /// Returns the controller names with the version suffix. /// For example: request from route V1 can be dispatched to ProductsV1Controller. /// </summary> public string SelectController(ODataPath odataPath, HttpRequestMessage request) { var baseControllerName = _innerRoutingConvention.SelectController(odataPath, request); if (baseControllerName != null) { return(string.Concat(baseControllerName, _versionSuffix)); } return(null); }