Beispiel #1
0
 /// <summary>
 /// Get the original type. <br />
 /// When type inherits from genericType, gets the first type parameter in the genericType corresponding to the type.
 /// </summary>
 /// <param name="type">The given type</param>
 /// <param name="genericType">The generic type</param>
 /// <returns></returns>
 public static Type GetRawTypeFromGenericClass(Type type, Type genericType) => Reflections.GetRawTypeFromGenericClass(type, genericType);
Beispiel #2
0
 /// <summary>
 /// Get the original type. <br />
 /// When type inherits from genericType, gets the first type parameter in the genericType corresponding to the type.
 /// </summary>
 /// <typeparam name="TGot">The given type TGot</typeparam>
 /// <typeparam name="TGeneric">The generic type TGeneric</typeparam>
 /// <returns></returns>
 public static Type GetRawTypeFromGenericClass <TGot, TGeneric>() => Reflections.GetRawTypeFromGenericClass <TGot, TGeneric>();
Beispiel #3
0
 /// <summary>
 /// Get type
 /// </summary>
 /// <typeparam name="T">Special type T</typeparam>
 public static Type Of <T>() => Reflections.GetUnderlyingType <T>();