Ejemplo n.º 1
0
        public void Disconnect()
        {
            if (_historyManager != null)
            {
                _historyManager.Flush();
                _historyManager.Dispose();
                _historyManager = null;
            }

            if (_historyStore != null)
            {
                _historyStore.Dispose();
                _historyStore = null;
            }

            if (_historyServiceClient != null)
            {
                _historyServiceClient = new HistoryServiceClient(Address);
            }

            if (_historySource == null)
            {
                _historySource = _historyServiceClient.ChannelFactory.CreateChannel();
            }
        }
Ejemplo n.º 2
0
        public SmartStorage(DataFeedStorage storage, IHistorySource source = null)
        {
            if (storage == null)
                throw new ArgumentNullException(nameof(storage));

            this.storage = storage;
            this.source = source;
        }
Ejemplo n.º 3
0
        public SmartStorage(DataFeedStorage storage, IHistorySource source = null)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }

            this.storage = storage;
            this.source  = source;
        }
Ejemplo n.º 4
0
        public bool Connect()
        {
            if (!IsConnected)
            {
                if (string.IsNullOrEmpty(Address))
                {
                    return(false);
                }

                if (_historyServiceClient == null)
                {
                    _historyServiceClient = new HistoryServiceClient(Address);
                }

                if (_historySource == null)
                {
                    _historySource = _historyServiceClient.ChannelFactory.CreateChannel();
                }
            }

            return(IsConnected);
        }
Ejemplo n.º 5
0
        public bool Connect()
        {
            if (!IsConnected)
            {
                if (string.IsNullOrEmpty(Address))
                {
                    return false;
                }

                if (_historyServiceClient == null)
                {
                    _historyServiceClient = new HistoryServiceClient(Address);
                }

                if (_historySource == null)
                {
                    _historySource = _historyServiceClient.ChannelFactory.CreateChannel();
                }
            }

            return IsConnected;
        }
Ejemplo n.º 6
0
        public void Disconnect()
        {
            if (_historyManager != null)
            {
                _historyManager.Flush();
                _historyManager.Dispose();
                _historyManager = null;
            }

            if (_historyStore != null)
            {
                _historyStore.Dispose();
                _historyStore = null;
            }

            if (_historyServiceClient != null)
			{
				_historyServiceClient = new HistoryServiceClient(Address);
            }

            if (_historySource == null)
			{
				_historySource = _historyServiceClient.ChannelFactory.CreateChannel();
            }
        }