Exemple #1
0
        private void ServiceRouteManager_Add(object sender, ServiceRouteEventArgs e)
        {
            var key = GetCacheKey(e.Route.ServiceDescriptor);

            _concurrent.GetOrAdd(key, e.Route);
            _serviceRoute.GetOrAdd(e.Route.ServiceDescriptor.RoutePath, e.Route);
        }
Exemple #2
0
        private void ServiceRouteManager_Removed(object sender, ServiceRouteEventArgs e)
        {
            var          key = GetCacheKey(e.Route.ServiceDescriptor);
            ServiceRoute value;

            _concurrent.TryRemove(key, out value);
            _serviceRoute.TryRemove(e.Route.ServiceDescriptor.RoutePath, out value);
        }