我正在尝试实现一个接收类型并返回包含其基类型的所有程序集的方法。
例如:
类A
是基类型(类A
属于程序集c:\A.dll)
类B
继承自A
(类B
属于程序集c:\B.dll)
类C
继承自B
(类C
属于程序集c:\c.dll)
public IEnumerable<string> GetAssembliesFromInheritance(string assembly,
string type)
{
// If the method recieves type C from assembly c:\C.dll
// it should return { "c:\A.dll", "c:\B.dll", "c:\C.dll" }
}
我的主要问题是AssemblyDefinition
Mono.Cecil 不包含任何像Location这样的属性。
如何在给定的情况下找到装配位置AssemblyDefinition
?