ICommunicationObject.cs 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //-----------------------------------------------------------------------------
  4. namespace System.ServiceModel
  5. {
  6. public interface ICommunicationObject
  7. {
  8. CommunicationState State { get; }
  9. event EventHandler Closed;
  10. event EventHandler Closing;
  11. event EventHandler Faulted;
  12. event EventHandler Opened;
  13. event EventHandler Opening;
  14. void Abort();
  15. void Close();
  16. void Close(TimeSpan timeout);
  17. IAsyncResult BeginClose(AsyncCallback callback, object state);
  18. IAsyncResult BeginClose(TimeSpan timeout, AsyncCallback callback, object state);
  19. void EndClose(IAsyncResult result);
  20. void Open();
  21. void Open(TimeSpan timeout);
  22. IAsyncResult BeginOpen(AsyncCallback callback, object state);
  23. IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state);
  24. void EndOpen(IAsyncResult result);
  25. }
  26. }