本文整理汇总了C#中ICSharpCode.WixBinding.WixDocument.Save方法的典型用法代码示例。如果您正苦于以下问题:C# WixDocument.Save方法的具体用法?C# WixDocument.Save怎么用?C# WixDocument.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.WixBinding.WixDocument
的用法示例。
在下文中一共展示了WixDocument.Save方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public void Init()
{
WixProject project = WixBindingTestsHelper.CreateEmptyWixProject();
document = new WixDocument(project, new DefaultFileLoader());
string xml = "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'><Product Name='MySetup'></Product></Wix>";
document.LoadXml(xml);
MockTextEditorOptions options = new MockTextEditorOptions();
options.ConvertTabsToSpaces = false;
options.IndentationSize = 1;
WixTextWriter wixWriter = new WixTextWriter(options);
xmlBuilder = new StringBuilder();
xmlWriter = wixWriter.Create(new StringWriter(xmlBuilder));
document.Save(xmlWriter);
}
示例2: Write
public void Write(WixDocument document)
{
ITextEditor openTextEditor = openTextEditors.FindTextEditorForDocument(document);
if (openTextEditor != null) {
UpdateOpenTextEditor(openTextEditor, document);
} else {
using (XmlWriter xmlWriter = wixTextWriter.Create(document.FileName)) {
document.Save(xmlWriter);
}
FileUtility.RaiseFileSaved(new FileNameEventArgs(document.FileName));
}
packageFilesControl.IsDirty = false;
}
示例3: Write
public void Write(WixDocument document)
{
if (!UpdateOpenFile(document)) {
ITextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
document.Save(properties.LineTerminator, properties.ConvertTabsToSpaces, properties.IndentationSize);
}
packageFilesControl.IsDirty = false;
}