IAwaitable.cs 428 B

123456789101112131415161718
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. #if HAS_AWAIT
  3. using System.Runtime.CompilerServices;
  4. namespace System.Linq
  5. {
  6. public interface IAwaitable
  7. {
  8. IAwaiter GetAwaiter();
  9. }
  10. public interface IAwaiter : ICriticalNotifyCompletion
  11. {
  12. bool IsCompleted { get; }
  13. void GetResult();
  14. }
  15. }
  16. #endif