/// <summary> /// Validates a condition to be false with defered formating of error message /// with ErrReportException thrown on failure /// </summary> /// <param name="condition">The condition to evaluate</param> /// <param name="code">The error code if true</param> /// <param name="msg">The error message function</param> public static void ChkFalse(bool condition, int code, Func <string> msgFunc) { if (condition) { // Format method only invoked on failure of condition WrapErr.ChkFalse(condition, code, WrapErr.SafeAction(msgFunc)); } }
/// <summary> /// Validates a condition to be true /// </summary> /// <param name="condition">The condition to evaluate</param> /// <param name="code">The error code if false</param> /// <param name="msg">The error message</param> public static void ChkDisposed(bool disposed, int code) { WrapErr.ChkFalse(disposed, code, "Attempting to use Disposed Object"); }