public DicomSendService(IStorageRepository storageRepository, IDicomClient dicomClient, IPathFinder pathFinder, IRouteFinder routeFinder)
        {
            if (storageRepository == null)
            {
                throw new ArgumentNullException(nameof(storageRepository));
            }
            this._storageRepository = storageRepository;

            if (dicomClient == null)
            {
                throw new ArgumentNullException(nameof(dicomClient));
            }
            this._dicomClient = dicomClient;

            if (pathFinder == null)
            {
                throw new ArgumentNullException(nameof(pathFinder));
            }
            this._pathFinder = pathFinder;

            if (routeFinder == null)
            {
                throw new ArgumentNullException(nameof(routeFinder));
            }
            this._routeFinder = routeFinder;
        }
示例#2
0
        public App(IPacsServer server,
                   IEncryptionServer encryptionServer,
                   ILinkSendServer linkSendServer,
                   IRouteFinder routeFinder)
        {
            if (server == null)
            {
                throw new ArgumentNullException(nameof(server));
            }
            if (encryptionServer == null)
            {
                throw new ArgumentNullException(nameof(encryptionServer));
            }
            if (linkSendServer == null)
            {
                throw new ArgumentNullException(nameof(linkSendServer));
            }
            if (routeFinder == null)
            {
                throw new ArgumentNullException(nameof(routeFinder));
            }

            this._server           = server;
            this._encryptionServer = encryptionServer;
            this._linkSendServer   = linkSendServer;
            this._routeFinder      = routeFinder;
            this._server.Build();
            this._routeFinder.Refresh();
        }
示例#3
0
        public App(IDecryptionServer decryptionServer,
                   IStorageRepository storageRepository,
                   CorePacsSettings coreSettings,
                   IRouteFinder routeFinder,
                   IDicomSendServer dicomSendServer)
        {
            if (decryptionServer == null)
            {
                throw new ArgumentNullException(nameof(decryptionServer));
            }
            this._decryptionServer = decryptionServer;

            if (storageRepository == null)
            {
                throw new ArgumentNullException(nameof(storageRepository));
            }
            if (coreSettings == null)
            {
                throw new ArgumentNullException(nameof(coreSettings));
            }
            if (routeFinder == null)
            {
                throw new ArgumentNullException(nameof(routeFinder));
            }
            if (dicomSendServer == null)
            {
                throw new ArgumentNullException(nameof(dicomSendServer));
            }
            this._storageRepository = storageRepository;
            this._coreSettings      = coreSettings;
            this._routeFinder       = routeFinder;
            this._dicomSendServer   = dicomSendServer;
            Build();
            this._routeFinder.Refresh();
        }
示例#4
0
        public LinkSendService(IStorageRepository storageRepository, IPathFinder pathFinder, IServiceInvoker serviceInvoker, IRouteFinder routeFinder)
        {
            if (storageRepository == null)
            {
                throw new ArgumentNullException(nameof(storageRepository));
            }
            this._storageRepository = storageRepository;

            if (serviceInvoker == null)
            {
                throw new ArgumentNullException(nameof(serviceInvoker));
            }
            this._serviceInvoker = serviceInvoker;

            if (pathFinder == null)
            {
                throw new ArgumentNullException(nameof(pathFinder));
            }
            this._pathFinder = pathFinder;

            if (routeFinder == null)
            {
                throw new ArgumentNullException(nameof(routeFinder));
            }
            this._routeFinder = routeFinder;
        }
示例#5
0
 public JourneyPlanner(Map map, IDistanceCalculator distanceCalculator, IShortestPathFinder shortestPathFinder, IRouteFinder routeFinder)
 {
     Map = map;
     DistanceCalculationService = distanceCalculator;
     ShortestPathFinder         = shortestPathFinder;
     RouteFinder = routeFinder;
 }
示例#6
0
 public OfferSearchService(IDataRepository <Offer> repository, ITomtomApi tomtomApi,
                           IRouteFinder routeFinder, IRouteValidator routeValidator)
 {
     _repository     = repository;
     _tomtomApi      = tomtomApi;
     _routeFinder    = routeFinder;
     _routeValidator = routeValidator;
 }
示例#7
0
 public void SetRouteFinder(IRouteFinder routeFinder)
 {
     if (routeFinder == null)
     {
         throw new ArgumentNullException("routeFinder");
     }
     _routeFinder = routeFinder;
 }
示例#8
0
 public void SetRouteFinder(IRouteFinder routeFinder)
 {
     if (routeFinder == null)
     {
         throw new ArgumentNullException("routeFinder");
     }
     _routeFinder = routeFinder;
     _topicExchangeRouteFinder = _routeFinder as ITopicExchangeRouteFinder;
 }
 public RouteFinderInterface(IRouteFinder routeFinder, Route[] routes)
 {
     this.routeFinder = routeFinder;
     this.routes = routes;
     stations = routes.Select(x => x.From)
         .Intersect(routes.Select(x => x.To))
         .Distinct()
         .OrderBy(x => x)
         .ToList();
 }
示例#10
0
 public RabbitTunnelWithPriorityQueuesSupport(IConsumerManager consumerManager,
                                              IRabbitWatcher watcher,
                                              IRouteFinder routeFinder,
                                              IDurableConnection connection,
                                              ISerializer serializer,
                                              ICorrelationIdGenerator correlationIdGenerator,
                                              bool setPersistent)
     : base(consumerManager, watcher, routeFinder, connection, serializer, correlationIdGenerator, setPersistent)
 {
     _priorityConsumerManager = new PriorityConsumerManager(watcher, consumerManager.MessageHandlerFactory, serializer);
 }
示例#11
0
 public DriveController(IDriveRepository driveRepository,
                        IUserAccountRepository userAccountRepository,
                        IUserGroupRepository userGroupRepository,
                        IRouteFinder routeFinder,
                        IRouteParser routeParser)
 {
     _driveRepository       = driveRepository;
     _userAccountRepository = userAccountRepository;
     _userGroupRepository   = userGroupRepository;
     _routeFinder           = routeFinder;
     _routeParser           = routeParser;
 }
示例#12
0
 public RabbitTunnelWithPriorityQueuesSupport(IRouteFinder routeFinder, IDurableConnection connection)
     : this(new ConsumerManager(Global.DefaultWatcher,
                                new DefaultMessageHandlerFactory(new ConsumerErrorHandler(connection.ConnectionFactory,
                                                                                          Global.DefaultSerializer,
                                                                                          Global.DefaultWatcher),
                                                                 Global.DefaultSerializer,
                                                                 Global.DefaultWatcher),
                                Global.DefaultSerializer),
            Global.DefaultWatcher,
            routeFinder,
            connection,
            Global.DefaultSerializer,
            Global.DefaultCorrelationIdGenerator,
            Global.DefaultPersistentMode)
 {
 }
示例#13
0
        /// <summary>
        /// Init the module with provided <see cref="LogicalPriorityMapper"/>
        /// </summary>
        /// <param name="mapper"></param>
        /// <param name="routeFinder">custom route finder</param>
        /// <returns></returns>
        public RabbitMqModule Load(LogicalPriorityMapper mapper, IRouteFinder routeFinder = null)
        {
            var internalBus = InternalBus.Current;
            var logger = DependencyResolver.Current.GetService<ILogger>() ?? new NullLogger();
            _rabbitBus = new RabbitMqBus(logger, internalBus, mapper, MessageQueueConnectionString, Environment, SetupQueues);
            if (routeFinder != null)
            {
                _rabbitBus.SetRouteFinder(routeFinder);
            }
            InternalBus.Current = new RabbitMqBusAdapter(_rabbitBus);

            Global.PendingJobCount = _rabbitBus.GetMessageCount;
            Burrow.Global.DefaultConsumerBatchSize = ushort.Parse(ConfigurationManager.AppSettings["TaskConcurrencyLevel"] ?? "4");
            Burrow.Global.PreFetchSize = uint.Parse(ConfigurationManager.AppSettings["PreFetchSize"] ?? ((Burrow.Global.DefaultConsumerBatchSize) * 2).ToString(CultureInfo.InvariantCulture));
            return this;
        }
示例#14
0
        /// <summary>
        /// Create a tunnel by <see cref="IConsumerManager"/>, <see cref="IRouteFinder"/>, <see cref="IDurableConnection"/>, <see cref="ISerializer"/> and <see cref="ICorrelationIdGenerator"/>
        /// </summary>
        /// <param name="consumerManager"></param>
        /// <param name="watcher"></param>
        /// <param name="routeFinder"></param>
        /// <param name="connection"></param>
        /// <param name="serializer"></param>
        /// <param name="correlationIdGenerator"></param>
        /// <param name="setPersistent"></param>
        public RabbitTunnel(IConsumerManager consumerManager,
                            IRabbitWatcher watcher,
                            IRouteFinder routeFinder,
                            IDurableConnection connection,
                            ISerializer serializer,
                            ICorrelationIdGenerator correlationIdGenerator,
                            bool setPersistent)
        {
            if (consumerManager == null)
            {
                throw new ArgumentNullException("consumerManager");
            }
            if (watcher == null)
            {
                throw new ArgumentNullException("watcher");
            }
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }
            if (correlationIdGenerator == null)
            {
                throw new ArgumentNullException("correlationIdGenerator");
            }

            _consumerManager        = consumerManager;
            _watcher                = watcher;
            _connection             = connection;
            _correlationIdGenerator = correlationIdGenerator;
            _observers              = new ConcurrentBag <IObserver <ISerializer> >();

            SetRouteFinder(routeFinder);
            SetSerializer(serializer);
            SetPersistentMode(setPersistent);

            _connection.Connected    += OpenTunnel;
            _connection.Disconnected += CloseTunnel;
            _subscribeActions         = new ConcurrentDictionary <Guid, Action>();
        }
示例#15
0
 public RouteController(IRouteFinder routeFinder, IFlightsService flightsService)
 {
     this.routeFinder    = routeFinder ?? throw new ArgumentNullException(nameof(routeFinder));
     this.flightsService = flightsService ?? throw new ArgumentNullException(nameof(flightsService));;
 }
示例#16
0
 public RabbitTunnelForTest(IRouteFinder routeFinder, IDurableConnection connection) : base(routeFinder, connection)
 {
 }
 public RabbitTunnelWithPriorityQueuesSupportForTest(IRouteFinder routeFinder, IDurableConnection connection)
     : base(routeFinder, connection)
 {
 }
示例#18
0
 public RabbitQueue(RabbitTunnel tunnel, ushort batchSize, ushort queuePrefetchSize, string subscriptionName, IRouteFinder routeFinder)
     : this(tunnel, batchSize, queuePrefetchSize, subscriptionName)
 {
     this._routeFinder = routeFinder;
 }
示例#19
0
        public void TestInitialise()
        {
            _Snapshot = Factory.TakeSnapshot();

            _RouteFinder = Factory.Resolve <IRouteFinder>();
        }
示例#20
0
 public void Dispose()
 {
     finder = null;
 }
示例#21
0
        public RouteFinderTest()
        {
            IMatrix matrix = new StandardMatrix("AB5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7");

            finder = new RouteFinder(matrix);
        }
示例#22
0
 public RouteService(IVertexRepository vertexRepository, IRouteFinder routeFinder)
 {
     this.vertexRepository = vertexRepository;
     this.routeFinder = routeFinder;
 }
示例#23
0
 public RabbitTunnelForTest(IRouteFinder routeFinder, IDurableConnection connection) : base(routeFinder, connection)
 {
 }
 internal HttpMethodImplementationManager(IRouteFinder routeFinder, IHttpMethodImplementationFinder implementationFinder)
 {
     _routeFinder          = routeFinder;
     _implementationFinder = implementationFinder;
 }
示例#25
0
 public RabbitTunnelForTest(IConsumerManager consumerManager, IRabbitWatcher watcher, IRouteFinder routeFinder, IDurableConnection connection, ISerializer serializer, ICorrelationIdGenerator correlationIdGenerator, bool setPersistent) 
     : base(consumerManager, watcher, routeFinder, connection, serializer, correlationIdGenerator, setPersistent)
 {
 }
 public RouteController(IRouteFinder routeFinder, IFlightsService flightsService)
 {
     this.routeFinder    = routeFinder;
     this.flightsService = flightsService;
 }
 public RabbitTunnelWithPriorityQueuesSupportForTest(IRouteFinder routeFinder, IDurableConnection connection) 
     : base(routeFinder, connection)
 {
 }
 public RouteFinderController(IRouteFinder routeFinder)
 {
     this.routeFinder = routeFinder;
 }
 public RabbitTunnelWithPriorityQueuesSupportForTest(IConsumerManager consumerManager, IRabbitWatcher watcher, IRouteFinder routeFinder, IDurableConnection connection, ISerializer serializer, ICorrelationIdGenerator correlationIdGenerator, bool setPersistent)
     : base(consumerManager, watcher, routeFinder, connection, serializer, correlationIdGenerator, setPersistent)
 {
 }
 public HttpMethodImplementationManager(IRouteFinder routeFinder)
     : this(routeFinder, new HttpMethodImplementationFinder())
 {
 }