예제 #1
0
 string GetTypeName(Type type)
 {
     if (type == typeof(Null))
     {
         return($"Null ({TypeUtility.GetResolvedTypeName(typeof(T))})");
     }
     return(TypeUtility.GetResolvedTypeName(type));
 }
예제 #2
0
 public static string GetNotAssignableWarningMessage(Type type, Type assignableTo)
 => $"Could not create an instance of type `{TypeUtility.GetResolvedTypeName(type)}`: Type must be assignable to `{TypeUtility.GetResolvedTypeName(assignableTo)}`";
예제 #3
0
 public static string GetNotConstructableWarningMessage(Type type)
 => $"Could not create an instance of type `{TypeUtility.GetResolvedTypeName(type)}`. A public parameter-less constructor or an explicit construction method is required.";