openHistorian.Adapters.LocalOutputAdapter.AttemptConnection C# (CSharp) Method

AttemptConnection() protected method

Attempts to connect to this LocalOutputAdapter.
protected AttemptConnection ( ) : void
return void
        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();
        }