本文整理汇总了C#中Localizer.LoadFromFile方法的典型用法代码示例。如果您正苦于以下问题:C# Localizer.LoadFromFile方法的具体用法?C# Localizer.LoadFromFile怎么用?C# Localizer.LoadFromFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Localizer
的用法示例。
在下文中一共展示了Localizer.LoadFromFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
//.........这里部分代码省略.........
intermediates.Add(intermediate);
continue; // next file
}
catch (WixNotIntermediateException)
{
// try another format
}
try
{
Library library = Library.Load(currentFile.FullName, linker.TableDefinitions, this.suppressVersionCheck);
intermediates.AddRange(library.Intermediates);
continue; // next file
}
catch (WixNotLibraryException)
{
// try another format
}
output = Output.Load(currentFile.FullName, this.suppressVersionCheck);
}
}
// instantiate the localizer and load any wixloc files
if (0 < this.localizationFiles.Count || !this.outputXml)
{
localizer = new Localizer();
localizer.Message += new MessageEventHandler(this.messageHandler.Display);
// load each wixloc file
foreach (string localizationFile in this.localizationFiles)
{
localizer.LoadFromFile(localizationFile);
}
// immediately stop processing if any errors were found
if (this.messageHandler.FoundError)
{
return this.messageHandler.PostProcess();
}
}
// and now for the fun part
currentFile = this.outputFile;
if (null == output)
{
// tell the linker about the localizer
linker.Localizer = localizer;
localizer = null;
output = linker.Link((Intermediate[])intermediates.ToArray(typeof(Intermediate)));
// if an error occurred during linking, stop processing
if (null == output)
{
return this.messageHandler.PostProcess();
}
}
else if (0 != intermediates.Count)
{
throw new InvalidOperationException("Cannot link object files (.wixobj) files with an output file (.wixout)");
}
output.Path = this.outputFile.FullName;