Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Ix/NET/System.Interactive.Async/IAsyncEnumerator.cs')
-rw-r--r--Ix/NET/System.Interactive.Async/IAsyncEnumerator.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Ix/NET/System.Interactive.Async/IAsyncEnumerator.cs b/Ix/NET/System.Interactive.Async/IAsyncEnumerator.cs
new file mode 100644
index 0000000..72cfdbc
--- /dev/null
+++ b/Ix/NET/System.Interactive.Async/IAsyncEnumerator.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+using System;
+using System.Threading.Tasks;
+using System.Threading;
+
+namespace System.Collections.Generic
+{
+ /// <summary>
+ /// Asynchronous version of the IEnumerator&lt;T&gt; interface, allowing elements to be
+ /// retrieved asynchronously.
+ /// </summary>
+ /// <typeparam name="T">Element type.</typeparam>
+ public interface IAsyncEnumerator<
+#if DESKTOPCLR40 || SILVERLIGHT4
+ out
+#endif
+ T> : IDisposable
+ {
+ /// <summary>
+ /// Advances the enumerator to the next element in the sequence, returning the result asynchronously.
+ /// </summary>
+ /// <param name="cancellationToken">Cancellation token that can be used to cancel the operation.</param>
+ /// <returns>
+ /// Task containing the result of the operation: true if the enumerator was successfully advanced
+ /// to the next element; false if the enumerator has passed the end of the sequence.
+ /// </returns>
+ Task<bool> MoveNext(CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the current element in the iteration.
+ /// </summary>
+ T Current { get; }
+ }
+}