/***************************************************/ public void SetPorts(int inputPort, int outputPort) { if (m_LinkIn != null) { m_LinkIn.DataObservers -= M_linkIn_DataObservers; } m_LinkIn = new SocketLink_Tcp(inputPort); m_LinkIn.DataObservers += M_linkIn_DataObservers; m_LinkOut = new SocketLink_Tcp(outputPort); ShowActiveButtonSet(); }
public RevitAdapter(RevitSettings revitSettings = null, bool active = false) { if (!active) { return; } RevitSettings = revitSettings.DefaultIfNull(); m_LinkIn = new SocketLink_Tcp(RevitSettings.ConnectionSettings.PushPort); m_LinkOut = new SocketLink_Tcp(RevitSettings.ConnectionSettings.PullPort); m_LinkOut.DataObservers += M_linkOut_DataObservers; m_WaitEvent = new ManualResetEvent(false); m_ReturnPackage = new List <object>(); m_ReturnEvents = new List <Event>(); m_WaitTime = RevitSettings.ConnectionSettings.MaxMinutesToWait; }