private void EnsureConnectionsOpened() { if ((SourceConnection.State & ConnectionState.Open) == 0) { SourceConnection.Open(); } if ((DestinyConnection.State & ConnectionState.Open) == 0) { DestinyConnection.Open(); } }
public void Open() { try { SourceConnection.Open(); Status = ConnectionStatus.Open; Opened?.Invoke(this, EventArgs.Empty); } catch (Exception) { Status = ConnectionStatus.Closed; OpenFailed?.Invoke(this, EventArgs.Empty); } }