本文整理汇总了C#中ICSharpCode.WixBinding.WixDocument.GetRootDirectory方法的典型用法代码示例。如果您正苦于以下问题:C# WixDocument.GetRootDirectory方法的具体用法?C# WixDocument.GetRootDirectory怎么用?C# WixDocument.GetRootDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.WixBinding.WixDocument
的用法示例。
在下文中一共展示了WixDocument.GetRootDirectory方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUpFixture
public void SetUpFixture()
{
WixDocument doc = new WixDocument();
doc.FileName = @"C:\Projects\Setup\Setup.wxs";
doc.LoadXml(GetWixXml());
WixPackageFilesDiff diff = new WixPackageFilesDiff(this);
diffResults = diff.Compare(doc.GetRootDirectory());
}
示例2: SetUpFixture
public void SetUpFixture()
{
WixDocument doc = new WixDocument();
doc.LoadXml(GetWixXml());
WixDirectoryElement rootDirectory = doc.GetRootDirectory();
WixDirectoryElement[] rootChildDirectories = rootDirectory.GetDirectories();
WixDirectoryElement programFilesDirectory = rootChildDirectories[0];
WixDirectoryElement[] programFilesChildDirectories = programFilesDirectory.GetDirectories();
WixDirectoryElement myAppDirectory = programFilesChildDirectories[0];
childComponents = myAppDirectory.GetComponents();
}
示例3: SetUpFixture
public void SetUpFixture()
{
WixBindingTestsHelper.RegisterResourceStringsWithSharpDevelopResourceManager();
WixDocument doc = new WixDocument();
doc.LoadXml(GetWixXml());
rootDirectory = doc.GetRootDirectory();
rootChildDirectories = rootDirectory.GetDirectories();
programFilesDirectory = rootChildDirectories[0];
programFilesChildDirectories = programFilesDirectory.GetDirectories();
myAppDirectory = programFilesChildDirectories[0];
testDirectory = rootChildDirectories[1];
}
示例4: SetUpFixture
public void SetUpFixture()
{
doc = new WixDocument();
doc.FileName = @"C:\Projects\Setup\Setup.wxs";
doc.LoadXml(GetWixXml());
WixDirectoryElement rootDirectory = doc.GetRootDirectory();
WixDirectoryElement[] rootChildDirectories = rootDirectory.GetDirectories();
WixDirectoryElement programFilesDirectory = rootChildDirectories[0];
WixDirectoryElement[] programFilesChildDirectories = programFilesDirectory.GetDirectories();
WixDirectoryElement myAppDirectory = programFilesChildDirectories[0];
WixComponentElement[] childComponents = myAppDirectory.GetComponents();
WixComponentElement coreComponent = childComponents[0];
files = coreComponent.GetFiles();
}
示例5: UpdateOpenTextEditorWithRootDirectoryChanges
void UpdateOpenTextEditorWithRootDirectoryChanges(ITextEditor textEditor, WixDocument document)
{
WixDirectoryElement rootDirectory = document.GetRootDirectory();
string xml = rootDirectory.GetXml(wixTextWriter);
WixDocumentEditor documentEditor = new WixDocumentEditor(textEditor);
DomRegion region = documentEditor.ReplaceElement(rootDirectory.Id, WixDirectoryElement.DirectoryElementName, xml);
if (!region.IsEmpty) {
return;
}
TextLocation location = FindProductElementEndLocation(textEditor, document);
if (!location.IsEmpty) {
documentEditor.InsertIndented(location, String.Concat(xml, "\r\n"));
}
}
示例6: SetUpFixture
public void SetUpFixture()
{
WixDocument doc = new WixDocument();
doc.LoadXml(GetWixXml());
directory = doc.GetRootDirectory();
}
示例7: NoDirectory
public void NoDirectory()
{
WixDocument doc = new WixDocument();
doc.LoadXml(GetWixXml());
Assert.IsNull(doc.GetRootDirectory());
}
示例8: FindRootDirectory
/// <summary>
/// Tries to find a root directory or root directory ref in the specified
/// document.
/// </summary>
FindRootDirectoryResult FindRootDirectory(WixDocument currentDocument)
{
if (currentDocument.HasProduct) {
WixDirectoryElement rootDirectory = currentDocument.GetRootDirectory();
if (rootDirectory != null) {
view.AddDirectories(rootDirectory.GetDirectories());
}
document = currentDocument;
return FindRootDirectoryResult.RootDirectoryFound;
} else {
WixDirectoryRefElement rootDirectoryRef = currentDocument.GetRootDirectoryRef();
if (rootDirectoryRef != null) {
view.AddDirectories(rootDirectoryRef.GetDirectories());
document = currentDocument;
usingRootDirectoryRef = true;
return FindRootDirectoryResult.RootDirectoryRefFound;
}
}
return FindRootDirectoryResult.NoMatch;
}