/// <summary> /// To judge the <see cref="givenType"/> is assignable to the <see cref="TGeneric"/> or not /// </summary> /// <typeparam name="TGeneric">泛型类型</typeparam> /// <param name="givenType">给定类型</param> /// <returns></returns> public static bool IsGenericImplementationFor <TGeneric>(this TypeInfo givenType) => Types.IsGenericImplementation(givenType, typeof(TGeneric));
/// <summary> /// To judge the <see cref="givenType"/> is assignable to the <see cref="TGeneric"/> or not /// </summary> /// <typeparam name="TGeneric">泛型类型</typeparam> /// <param name="givenType">给定类型</param> /// <returns></returns> public static bool IsAssignableToGenericType <TGeneric>(this TypeInfo givenType) => Types.IsGenericImplementation(givenType, typeof(TGeneric));
/// <summary> /// To judge the <see cref="givenType"/> is assignable to the <see cref="genericType"/> or not /// </summary> /// <param name="givenType">给定类型</param> /// <param name="genericType">泛型类型</param> /// <returns></returns> public static bool IsGenericImplementationFor(this TypeInfo givenType, TypeInfo genericType) => Types.IsGenericImplementation(genericType, genericType);
/// <summary> /// To judge the <see cref="givenType"/> is assignable to the <see cref="genericType"/> or not /// </summary> /// <param name="givenType">给定类型</param> /// <param name="genericType">泛型类型</param> /// <returns></returns> public static bool IsAssignableToGenericType(this TypeInfo givenType, TypeInfo genericType) => Types.IsGenericImplementation(genericType, genericType);