/// <summary> /// Attempts to disconnect from this <see cref="LocalOutputAdapter"/>. /// </summary> protected override void AttemptDisconnection() { m_archive = null; m_server.Dispose(); m_server = null; OnDisconnected(); m_archivedMeasurements = 0; }
/// <summary> /// Attempts to connect to this <see cref="LocalOutputAdapter"/>. /// </summary> protected override void AttemptConnection() { // Open archive files Dictionary<string, string> settings = m_dataChannel.ParseKeyValuePairs(); string setting; int port; if (!settings.TryGetValue("port", out setting) || !int.TryParse(setting, out port)) port = DefaultPort; m_server = new HistorianServer(m_archiveInfo, port); m_archive = m_server[InstanceName]; // Initialization of services needs to occur after files are open m_dataServices.Initialize(); m_replicationProviders.Initialize(); OnConnected(); }