mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-30 14:52:51 +08:00
20 lines
420 B
C#
20 lines
420 B
C#
namespace Spectre.Console;
|
|
|
|
internal static class StackExtensions
|
|
{
|
|
public static void PushRange<T>(this Stack<T> stack, IEnumerable<T> source)
|
|
{
|
|
if (stack is null)
|
|
{
|
|
throw new ArgumentNullException(nameof(stack));
|
|
}
|
|
|
|
if (source != null)
|
|
{
|
|
foreach (var item in source)
|
|
{
|
|
stack.Push(item);
|
|
}
|
|
}
|
|
}
|
|
} |