private void CheckConnected(string message) { if (!IsConnected) { tl.LogMessage("CheckConnected", "connectedState=false" + message); throw new ASCOM.NotConnectedException(message); } }