Add support for selecting prompt items

Closes #447
This commit is contained in:
Patrik Svensson
2021-06-27 21:59:58 +02:00
committed by Phil Scott
parent fa553fd72e
commit 865552c3f2
8 changed files with 165 additions and 47 deletions

View File

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
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);
}
}
}
}
}