如何通过罗斯林找到基类的路径?
我试图通过罗斯林找到基类的路径,但找不到任何有用的资源。 有人知道如何解决问题吗?
例如路径:“ ../file1.cs”包含:
using ...;
namespace Extraction
{
class Class1 : Class2 {
}
}
假设Class2在路径中:“ ../../../file2.cs”,我想分析“ .../file1.cs”文件并查找使用罗斯琳(Roslyn)的基类(class2)路径。是否可以?
编辑:我想实现的目标是合并派生类和父类的所有方法(直至最后一个级别)。我当时想最初找到所有父级的路径(迭代),然后将它们合并为一个类。
I am trying to find the path of the base class via Roslyn but I could not find any helpful resource.
Does anyone have an idea how to approach the problem.
E.g. path: "../File1.cs" contains:
using ...;
namespace Extraction
{
class Class1 : Class2 {
}
}
Assuming that Class2 is in path: "../../File2.cs", I want to analyze the ".../File1.cs" file and find the base class (Class2) path using Roslyn. Is it possible?
Edit: What I would like to achieve is merging all the methods of the derived class and parent classes (up to the last level) into one class. I was thinking to initially find the paths of all parent classes (iteratively) and afterwards merge them into one class.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论