Patrik Svensson 52c1d9122b
Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00

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);
}
}
}
}