mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 17:02:51 +08:00

Also moves tests to `./test` which makes it possible for all test projects to share the same .editorconfig files and similar.
21 lines
415 B
C#
21 lines
415 B
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|