mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 17:02:51 +08:00
17 lines
320 B
C#
17 lines
320 B
C#
namespace Spectre.Console;
|
|
|
|
public static class ShouldlyExtensions
|
|
{
|
|
[DebuggerStepThrough]
|
|
public static T And<T>(this T item, Action<T> action)
|
|
{
|
|
if (action == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(action));
|
|
}
|
|
|
|
action(item);
|
|
return item;
|
|
}
|
|
}
|