예제 #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);
 }