IMessageSource.cs 733 B

12345678910111213141516171819202122232425
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Channels
  5. {
  6. using System.Threading;
  7. enum AsyncReceiveResult
  8. {
  9. Completed,
  10. Pending,
  11. }
  12. interface IMessageSource
  13. {
  14. AsyncReceiveResult BeginReceive(TimeSpan timeout, WaitCallback callback, object state);
  15. Message EndReceive();
  16. Message Receive(TimeSpan timeout);
  17. AsyncReceiveResult BeginWaitForMessage(TimeSpan timeout, WaitCallback callback, object state);
  18. bool EndWaitForMessage();
  19. bool WaitForMessage(TimeSpan timeout);
  20. }
  21. }