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(); } }
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); }
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; }