示例#1
0
 public static void IsEnum([ValidatedNotNull] object value, string parameterName)
 {
     Requires.NotNull(value, parameterName);
     Assumes.IsTrue(value.GetType().GetTypeInfo().IsEnum);
 }
示例#2
0
 public static void Null(object value)
 {
     Assumes.IsTrue(value == null);
 }
示例#3
0
 public static void Fail(string message)
 {
     Assumes.FailFast(message);
 }
示例#4
0
 public static void NotNull <T1, T2, T3>(T1 value1, T2 value2, T3 value3)
 {
     Assumes.NotNull(value1);
     Assumes.NotNull(value2);
     Assumes.NotNull(value3);
 }
示例#5
0
 public static void NotNullOrEmpty([ValidatedNotNull] string value)
 {
     Assumes.NotNull(value);
     Assumes.IsTrue(value.Length > 0);
 }
示例#6
0
 public static void NotNull <T1, T2>(T1 value1, T2 value2)
 {
     Assumes.NotNull(value1);
     Assumes.NotNull(value2);
 }
示例#7
0
 public static void NotNull <T>(T value)
 {
     Assumes.IsTrue(value != null);
 }
示例#8
0
 public static void IsType <T>([ValidatedNotNull] object value, string parameterName)
 {
     Assumes.IsType(value, typeof(T), parameterName);
 }
示例#9
0
 public static void IsType([ValidatedNotNull] object value, Type expectedType, string parameterName)
 {
     Requires.NotNull(value, parameterName);
     Assumes.IsTrue(value.GetType() == expectedType);
 }
示例#10
0
 public static void IsTrue(bool condition)
 {
     Assumes.IsTrue(condition, null);
 }