This commit is contained in:
CortexCore
2024-11-03 16:42:23 +08:00
commit b125894cc3
5904 changed files with 1070129 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using System;
namespace BITKit
{
public static partial class Extensions
{
public static T IsNull<T>(this T t, Action action)
{
if (t is null)
{
action.Invoke();
}
return t;
}
public static T IsNotNull<T>(this T t, Action<T> action)
{
if (t is not null)
{
action.Invoke(t);
}
return t;
}
}
}