public static bool IsType(this TypeReference type, TypeReference targetType) => type.GetAssemblyQualifiedName() == targetType.GetAssemblyQualifiedName();
public static bool IsType(this TypeReference type, string assemblyQualifiedName) => assemblyQualifiedName == type.GetAssemblyQualifiedName();
public static bool IsType(this TypeReference type, Type targetType) => type.GetAssemblyQualifiedName() == targetType.GetAssemblyQualifiedName() || type.FullName == targetType.FullName && type.Resolve().GetAssemblyQualifiedName() == targetType.GetAssemblyQualifiedName();