public void Dispose()
 {
     if (_client.State == CommunicationState.Faulted)
     {
         _client.Abort();
     }
     else
     {
         _client.Close();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (mClient != null)
         {
             if (mClient.State == CommunicationState.Faulted)
             {
                 mClient.Abort();
             }
             else
             {
                 mClient.Close();
             }
         }
     }
 }
Esempio n. 3
0
 public void Abort()
 {
     _client.Abort();
 }