gpt4 book ai didi

c# - 如何找到所有包含匹配模式的类型/成员的程序集?

转载 作者:可可西里 更新时间:2023-11-01 08:47:27 25 4
gpt4 key购买 nike

我有一个包含数千个文件的文件夹(可能包含嵌套的子文件夹),其中一些是 DLL,而其中一些 DLL 是 .NET 程序集。我需要找到所有包含与特定模式匹配的类型/成员的程序集(例如 "*Collection""Create*")。最好(最快)的方法是什么?

只要使用不需要打开我的源代码,就可以推荐开源库。

最佳答案

也许这个 api 对你有用:http://cciast.codeplex.com/

Microsoft Research Common Compiler Infrastructure (CCI) is a set of libraries and an application programming interface (API) that supports some of the functionality that is common to compilers and related programming tools. CCI is used primarily by applications that create, modify or analyze .NET portable executable (PE) and debug (PDB) files.

或者您可以使用 Assembly.LoadFrom(path) 加载所有内容并调用 Assembly.GetExportedTypes()

关于c# - 如何找到所有包含匹配模式的类型/成员的程序集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16377235/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com