示例#1
0
 public static IMustAssertable AssertNotNull <T>(
     this IMustAssertable must,
     T value)
     where T : class
 {
     return(must.Assert(
                value != null,
                _innerException => new ArgumentNullException(null, _innerException)));
 }
示例#2
0
 public static IMustAssertable AssertArgumentNotNull <T>(
     this IMustAssertable must,
     T value,
     [InvokerParameterName] string parameterName)
     where T : class
 {
     return(must.Assert(
                value != null,
                //// ReSharper disable once AssignNullToNotNullAttribute
                _innerException => ExceptionHelper.Combine(new ArgumentNullException(parameterName), _innerException)));
 }