Ejemplo n.º 1
0
 public SelfHost()
 {
     _log            = new ServiceEventLogger();
     _tcp            = new TcpService();
     _dbRepo         = new DbRepository();
     _pricePublisher = new ExchangePricesPublisher(_log);
     _msgHandling    = new MessageHandling(_dbRepo, _log, _pricePublisher);
 }
Ejemplo n.º 2
0
        public MessageHandling(DbRepository dbRepo, ServiceEventLogger log, ExchangePricesPublisher scheduler)
        {
            _logMatchingData = Int32.Parse(ConfigurationManager.AppSettings["LogMatchingData"]) == 1;

            _restScheduler = scheduler;
            _dbRepo        = dbRepo;
            _log           = log;
            _obj           = new object();
        }
Ejemplo n.º 3
0
        public ExchangePricesPublisher(ServiceEventLogger log)
        {
            _connections = new List <Tuple <CurrencyName, IPEndPoint> >();
            _tcp         = new TcpService();
            _obj         = new object();
            _timeout     = Int32.Parse(ConfigurationManager.AppSettings["RestSchedulerTimeoutSec"]);
            _log         = log;

            _timer          = new Timer();
            _timer.Elapsed += OnTimerElapsed;
        }