IAwaitable.cs 556 B

1234567891011121314151617181920212223
  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;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.Runtime.CompilerServices;
  7. using System.Threading;
  8. using System.Threading.Tasks;
  9. namespace System.Linq
  10. {
  11. public interface IAwaitable
  12. {
  13. IAwaiter GetAwaiter();
  14. }
  15. public interface IAwaiter : ICriticalNotifyCompletion
  16. {
  17. bool IsCompleted { get; }
  18. void GetResult();
  19. }
  20. }
  21. #endif