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