// a route should be marked as inactive in the case that CBA should be used public static void MarkARouteAsInactive(string normalizedVirtualPath) { ServiceDeploymentInfo serviceInfo = (ServiceDeploymentInfo)routeServiceTable[normalizedVirtualPath]; if (serviceInfo != null) { serviceInfo.MessageHandledByRoute = false; } }
public static void MarkRouteAsActive(string normalizedVirtualPath) { ServiceDeploymentInfo info = (ServiceDeploymentInfo)routeServiceTable[normalizedVirtualPath]; if (info != null) { info.MessageHandledByRoute = true; } }
private static void AddServiceInfo(string virtualPath, ServiceDeploymentInfo serviceInfo) { try { routeServiceTable.Add(virtualPath, serviceInfo); } catch (ArgumentException) { throw FxTrace.Exception.Argument("virtualPath", System.ServiceModel.Activation.SR.Hosting_RouteHasAlreadyBeenAdded(virtualPath)); } }
public static bool IsActiveAspNetRoute(string virtualPath) { bool messageHandledByRoute = false; if (!string.IsNullOrEmpty(virtualPath)) { ServiceDeploymentInfo info = (ServiceDeploymentInfo)routeServiceTable[virtualPath]; if (info != null) { messageHandledByRoute = info.MessageHandledByRoute; } } return(messageHandledByRoute); }
static void AddServiceInfo(string virtualPath, ServiceDeploymentInfo serviceInfo) { Fx.Assert(!string.IsNullOrEmpty(virtualPath), "virtualPath should not be empty or null"); Fx.Assert(serviceInfo != null, "serviceInfo should not be null"); // We cannot support dulicated route routes even Asp.Net route allows it try { routeServiceTable.Add(virtualPath, serviceInfo); } catch (ArgumentException) { throw FxTrace.Exception.Argument("virtualPath", SR.Hosting_RouteHasAlreadyBeenAdded(virtualPath)); } }