Example #1
0
        // 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;
            }
        }
Example #2
0
        public static void MarkRouteAsActive(string normalizedVirtualPath)
        {
            ServiceDeploymentInfo info = (ServiceDeploymentInfo)routeServiceTable[normalizedVirtualPath];

            if (info != null)
            {
                info.MessageHandledByRoute = true;
            }
        }
Example #3
0
 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));
     }
 }
 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));
     }
 }
Example #5
0
        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));
     }
 }
Example #7
0
 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));
     }
 }