本文整理汇总了C#中Module.WriteDocumentation方法的典型用法代码示例。如果您正苦于以下问题:C# Module.WriteDocumentation方法的具体用法?C# Module.WriteDocumentation怎么用?C# Module.WriteDocumentation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Module
的用法示例。
在下文中一共展示了Module.WriteDocumentation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveModule
public virtual void SaveModule(Module module, CompilerParameters options, CompilerResults results){
if (module == null || options == null || results == null){Debug.Assert(false); return;}
AssemblyReferenceList arefs = module.AssemblyReferences;
//TODO: give the error in the context of the member that made the reference
for (int i = 0, n = arefs == null ? 0 : arefs.Count; i < n; i++){
AssemblyReference aref = arefs[i];
if (aref == null || aref.Assembly == null) continue;
ArrayList metadataErrors = aref.Assembly.MetadataImportErrors;
if (metadataErrors == null) continue;
foreach (Exception mdErr in metadataErrors)
if (mdErr.Message.StartsWith("Assembly reference not resolved"))
results.Errors.Add(new CompilerError(aref.Assembly.Name+".dll", 0, 0, "0", mdErr.Message));
}
if (results.NativeCompilerReturnValue != 0) return; //TODO: allow option to override this
ErrorNodeList errors = new ErrorNodeList(0);
string fileName = this.GetTargetFileName(options, errors);
this.AddResourcesAndIcons(module, options, errors);
if (errors.Count == 0){
module.WriteModule(fileName, options);
CompilerOptions coptions = options as CompilerOptions;
if (coptions != null && coptions.XMLDocFileName != null && coptions.XMLDocFileName.Length > 0)
module.WriteDocumentation(new StreamWriter(coptions.XMLDocFileName));
results.PathToAssembly = fileName;
}else{
this.ProcessErrors(options, results, errors);
}
}