Ejemplo n.º 1
0
 public static bool IsNullable(Type t)
 {
     ValidationUtils.ArgumentNotNull(t, "t");
     return(!TypeExtensions.IsValueType(t) || IsNullableType(t));
 }
Ejemplo n.º 2
0
 private static bool IsCompatibleObject(object value)
 {
     return(value is T || value == null && (!TypeExtensions.IsValueType(typeof(T)) || ReflectionUtils.IsNullableType(typeof(T))));
 }
Ejemplo n.º 3
0
 public static bool HasDefaultConstructor(Type t, bool nonPublic)
 {
     ValidationUtils.ArgumentNotNull(t, "t");
     return(TypeExtensions.IsValueType(t) || GetDefaultConstructor(t, nonPublic) != null);
 }