コード例 #1
0
 static FilteringRoutingServiceTest()
 {
     RouteStore = new RouteStore(new Dictionary <string, RouterConfig>
     {
         { "hub1", new RouterConfig(AllEndpoints, AllRoutes) }
     });
 }
コード例 #2
0
 public ChangeRoutingStrategy(IRouteStore store,
                              IServiceProvider provider,
                              IDefaultRouting <IService> defaultRouting)
 {
     _store          = store;
     _provider       = provider;
     _defaultRouting = defaultRouting;
 }
コード例 #3
0
ファイル: RoutingHost.cs プロジェクト: zmitov/CondenserDotNet
        public RoutingHost(ILoggerFactory logger,
                           CustomRouter router, IRouteStore store, IRouteSource source,
                           IRoutingConfig config)
        {
            _router = router;
            _logger = logger?.CreateLogger <RoutingHost>();
            _store  = store;
            _source = source;
            _config = config;

            var ignore = WatchLoop();
        }
コード例 #4
0
        public FilteringRoutingService(IRoutingService underlying, IRouteStore routeStore, INotifierFactory notifierFactory, IRouteCompiler compiler)
        {
            this.underlying      = Preconditions.CheckNotNull(underlying, nameof(underlying));
            this.routeStore      = Preconditions.CheckNotNull(routeStore, nameof(routeStore));
            this.notifierFactory = Preconditions.CheckNotNull(notifierFactory, nameof(notifierFactory));
            this.compiler        = Preconditions.CheckNotNull(compiler, nameof(compiler));

            this.evaluators = new AtomicReference <ImmutableDictionary <string, Evaluator> >(ImmutableDictionary <string, Evaluator> .Empty);
            this.notifiers  = new AtomicReference <ImmutableDictionary <string, INotifier> >(ImmutableDictionary <string, INotifier> .Empty);
            this.cts        = new CancellationTokenSource();
            this.closed     = new AtomicBoolean(false);
            this.sync       = new AsyncLock();
        }
コード例 #5
0
 public FilteringRoutingService(IRoutingService underlying, IRouteStore routeStore, INotifierFactory notifierFactory)
     : this(underlying, routeStore, notifierFactory, RouteCompiler.Instance)
 {
 }
コード例 #6
0
 public ServerStatsRoute(IRouteStore store) => _store = store;
コード例 #7
0
ファイル: UrlSlugRouter.cs プロジェクト: pahlot/Contently
 public UrlSlugRouter(IRouter target, IContentDataService <RoutablePage> dataService, IRouteStore routeStore)
 {
     this.target      = target;
     this.dataService = dataService;
     this.routeStore  = routeStore;
 }
コード例 #8
0
 public HealthStatsRouter(IHealthConfig config, IRouteStore store)
 {
     _config = config;
     Routes  = new[] { _config.Route };
     _store  = store;
 }
コード例 #9
0
 public RouteSummary(IRouteStore routeStore)
 {
     _routeStore = routeStore;
     Routes      = new[] { CondenserRoutes.Summary };
 }