コード例 #1
0
 /// <summary>
 /// Return the next item in the current queue without removing it. Calling this method is equivalent
 /// to calling <see cref="IAsyncQueue{T}.PeekAsync(CancellationToken)"/> with a value of
 /// <see cref="CancellationToken.None"/>.
 /// </summary>
 /// <typeparam name="T">The type of the queued items.</typeparam>
 /// <param name="queue">The current <see cref="IAsyncQueue{T}"/> implementation.</param>
 /// <returns>
 /// An object of the queued item type.
 /// </returns>
 public static Task <T> PeekAsync <T>(this IAsyncQueue <T> queue)
 {
     return(queue.PeekAsync(CancellationToken.None));
 }