// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information. 
namespace System.Linq
{
    /// 
    /// Interface for yielding elements to enumerator.
    /// 
    /// Type of the elements yielded to an enumerator.
    public interface IYielder
    {
        /// 
        /// Stops the enumeration.
        /// 
        /// Awaitable object for use in an asynchronous method.
        IAwaitable Break();
        /// 
        /// Yields a value to the enumerator.
        /// 
        /// Value to yield return.
        /// Awaitable object for use in an asynchronous method.
        IAwaitable Return(T value);
    }
}