当前位置: 首页>>代码示例>>C#>>正文


C# WixDocument.GetRootDirectory方法代码示例

本文整理汇总了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());
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:OneMissingFileTestFixture.cs

示例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();
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:11,代码来源:ChildComponentsTestFixture.cs

示例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];
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:13,代码来源:ChildDirectoriesTestFixture.cs

示例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();
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:14,代码来源:ChildFilesTestFixture.cs

示例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"));
			}
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:16,代码来源:PackageFilesView.cs

示例6: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			directory = doc.GetRootDirectory();
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:6,代码来源:RootDirectoryTestFixture.cs

示例7: NoDirectory

		public void NoDirectory()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			Assert.IsNull(doc.GetRootDirectory());
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:6,代码来源:NoRootDirectoryTestFixture.cs

示例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;
		}
开发者ID:hefnerliu,项目名称:SharpDevelop,代码行数:24,代码来源:WixPackageFilesEditor.cs


注:本文中的ICSharpCode.WixBinding.WixDocument.GetRootDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。