public CSnapshoterDeals(IClientSnapshoter plaza2Connector, string nameUpdater, int updateInterval)
     : base((IClientSnapshoter)plaza2Connector, nameUpdater, updateInterval)
 {
     if (_plaza2Connector.GlobalConfig.IsTradingServer)
     {
         (new Thread(ThreadFunc)).Start();
     }
 }
        public CBaseSnapshoter(/*CPlaza2Connector*/ IClientSnapshoter plaza2Connector, string nameUpdater, int paranUpdateInterval)
        {
            _nameUpdater      = nameUpdater;
            _plaza2Connector  = plaza2Connector;
            _logger           = new CLogger(_nameUpdater);
            _paramUpdInterval = paranUpdateInterval;

            foreach (KeyValuePair <string, long> kvp in plaza2Connector.Instruments.DictInstrument_IsinId)
            {
                _dictLastUpdate[kvp.Key] = new DateTime(0);
            }
        }
Esempio n. 3
0
        public CSnapshoter(IClientSnapshoter clientSnapshoter,
                           IAlarmable alarmer)
            : base(alarmer)
        {
            //GetSnapshot = getSnapshot;
            _fileName = "TablesSnapshot.dat";

            _fileIO       = new CFileIOBinaryDataStatic(GetFullPath(), _alarmer);
            _snapshotSave = _fileIO.LoadData <byte[]>();
            //_snapshotSave_snapshotNew.CopyTo(_snapshotSave, 0);

            CUtil.ThreadStart(ThreadSaveSnapshot);
            _client = clientSnapshoter;
        }
Esempio n. 4
0
        public CSnapshoterStock(IClientSnapshoter client, string nameUpdater, int stockDept, int updateInterval) :
            base(client, nameUpdater, updateInterval)
        {
            _client = client;

            foreach (KeyValuePair <string, long> kvp in client.Instruments.DictInstrument_IsinId)
            {
                string isin = kvp.Key;


                _inpStocks[isin]  = new CSharedStocks(_client);
                _outpStocks[isin] = new CSharedStocks(_client);
                _dtLastUpdateNotTradingTime[isin] = DateTime.Now;
            }

            (new Thread(ThreadFunc)).Start();
        }
Esempio n. 5
0
 public CSnapshoterStockSmart(IClientSnapshoter client, string nameUpdater, int stockDept, int updateInterval) :
     base(client, nameUpdater, stockDept, updateInterval)
 {
 }