public static void Main() { // 获取要反射的程序集的路径和名称 XDocument attr = new XDocument(); Assembly assembly = Assembly.GetAssembly(attr.GetType()); String AssemblyFile = assembly.CodeBase; // 对程序集进行反射 Reflector reflector = new Reflector(); reflector.Reflect(AssemblyFile); // 生成 HTML 文档 XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Indent = true; XmlWriter writer = XmlWriter.Create(HtmlFile, settings); reflector.Transform(writer); writer.Close(); // 显示 HTML 文档 FileInfo fileInfo = new FileInfo(HtmlFile); if (fileInfo.Exists) Process.Start("iexplore.exe", fileInfo.FullName); }
public static void Main() { // Get Path and Name of assembly to reflect XDocument attr = new XDocument(); Assembly assembly = Assembly.GetAssembly(attr.GetType()); String AssemblyFile = assembly.CodeBase; // reflect over the assembly Reflector reflector = new Reflector(); reflector.Reflect(AssemblyFile); // generate the HTML document XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Indent = true; XmlWriter writer = XmlWriter.Create(HtmlFile, settings); reflector.Transform(writer); writer.Close(); // display the HTML document FileInfo fileInfo = new FileInfo(HtmlFile); if (fileInfo.Exists) Process.Start("iexplore.exe", fileInfo.FullName); }