<Compile Include="$(MSBuildThisFileDirectory)System\Collections\DictionaryEntry.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\ArraySortHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\Dictionary.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\IAsyncEnumerable.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\IAsyncEnumerator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\ICollection.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\ICollectionDebugView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\IComparer.cs" />
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Collections.Generic
+{
+ /// <summary>Exposes an enumerator that provides asynchronous iteration over values of a specified type.</summary>
+ /// <typeparam name="T">The type of values to enumerate.</typeparam>
+ public interface IAsyncEnumerable<out T>
+ {
+ /// <summary>Returns an enumerator that iterates asynchronously through the collection.</summary>
+ /// <returns>An enumerator that can be used to iterate asynchronously through the collection.</returns>
+ IAsyncEnumerator<T> GetAsyncEnumerator();
+ }
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Threading.Tasks;
+
+namespace System.Collections.Generic
+{
+ /// <summary>Supports a simple asynchronous iteration over a generic collection.</summary>
+ /// <typeparam name="T">The type of objects to enumerate.</typeparam>
+ public interface IAsyncEnumerator<out T> : IAsyncDisposable
+ {
+ /// <summary>Advances the enumerator asynchronously to the next element of the collection.</summary>
+ /// <returns>
+ /// A <see cref="ValueTask{Boolean}"/> that will complete with a result of <c>true</c> if the enumerator
+ /// was successfully advanced to the next element, or <c>false</c> if the enumerator has passed the end
+ /// of the collection.
+ /// </returns>
+ ValueTask<bool> MoveNextAsync();
+
+ /// <summary>Gets the element in the collection at the current position of the enumerator.</summary>
+ T Current { get; }
+ }
+}