我正在为我正在开发的项目制作一个MSDN样式文档站点。我想知道是否有办法遍历所有类,包括它们的公共属性/方法,并获取其网页生成的摘要和其他属性。下面详细说明:c#遍历文档生成的所有类属性和方法
为I类需要的名称空间+摘要+继承的类+类定义语法+公共构造+公共属性+公有方法
实施例:
namespace foo
{
/// <summary>
/// ss
/// </summary>
public class bar : ClassA, InterfaceA
{
public bar(int a, int b)
{
}
public int Property1 { get;set; }
public int Method1(int a)
{
return 1;
}
}
}
命名空间= FOO
摘要= ss
继承的类= ClassA
类定义语法= public class bar : ClassA, InterfaceA
public const ructors =栏(INT,INT)
公共属性= Property1
公共方法方法1 =(int)的
,并为所有的方法,属性我需要的类型,如果它是只读等。
长话短说,基本上我想要尽可能地生成MSDN中的信息。任何帮助或想法表示赞赏。
反射?也许罗斯林。 – MarcinJuraszek
@MarcinJuraszek反射无法得到总结.... – Steve
做这里提到的任何解决方案有帮助吗? http://stackoverflow.com/questions/641364/c-sharp-documentation-generator – adv12