示例#1
0
 /// <summary>
 /// 获取原始类型。当类型从泛型类型中继承时,获取泛型类型中与该类型相对应的第一个类型参数
 /// </summary>
 /// <typeparam name="TGot">类型</typeparam>
 /// <typeparam name="TGeneric">泛型类型</typeparam>
 public static Type GetRawTypeFromGenericClass <TGot, TGeneric>() => Reflections.GetRawTypeFromGenericClass <TGot, TGeneric>();
示例#2
0
 /// <summary>
 /// 获取原始类型。当类型从泛型类型中继承时,获取泛型类型中与该类型相对应的第一个类型参数
 /// </summary>
 /// <param name="type">类型</param>
 /// <param name="genericType">泛型类型</param>
 public static Type GetRawTypeFromGenericClass(Type type, Type genericType) => Reflections.GetRawTypeFromGenericClass(type, genericType);