using DispenserCommon.Exceptions;
namespace DispenserCommon.Utils;
///
/// 断言工具类
///
public class AssertUtil
{
///
/// 判断条件是否为真
///
///
///
public static void IsTrue(bool expression, string msg)
{
if (!expression)
{
throw new AssertException(msg);
}
}
///
/// 判断条件是否为假
///
///
///
public static void IsFalse(bool expression, string msg)
{
if (expression)
{
throw new AssertException(msg);
}
}
///
/// 集合非空断言
///
///
///
public static void NotEmpty(List