//// 配置 xml 文档
                //var BaseDirectory = AppContext.BaseDirectory;
                //var xmlFileLoacl = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
                //var xmlPath = System.IO.Path.Combine(BaseDirectory, xmlFileLoacl);
                //sgo.IncludeXmlComments(xmlPath, true);
                //AssemblyName[] assemblyNames =  System.Reflection.Assembly.GetEntryAssembly().GetReferencedAssemblies();
                //foreach (AssemblyName assName in assemblyNames)
                //{
                //    var xmlFileLoaclAssembly = assName.Name+".xml";
                //    sgo.IncludeXmlComments(System.IO.Path.Combine(BaseDirectory, xmlFileLoaclAssembly), true);
                //}
                //创建一个DirectoryInfo的类
                DirectoryInfo directoryInfo = new DirectoryInfo(AppContext.BaseDirectory);
                //获取当前的目录的文件
                FileInfo[] fileInfos = directoryInfo.GetFiles("*.xml");
                foreach (FileInfo f in fileInfos)
                {
                    sgo.IncludeXmlComments(f.FullName, true);
                }

相关文章:

猜你喜欢
相关资源
相似解决方案