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


C# Tree.LookupNode方法代码示例

本文整理汇总了C#中Monodoc.Tree.LookupNode方法的典型用法代码示例。如果您正苦于以下问题:C# Tree.LookupNode方法的具体用法?C# Tree.LookupNode怎么用?C# Tree.LookupNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Monodoc.Tree的用法示例。


在下文中一共展示了Tree.LookupNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PopulateTree

	public override void PopulateTree (Tree tree)
	{
		Node top = tree.LookupNode ("Directory at: " + basedir, "simple:");
		
		foreach (string dir in Directory.GetDirectories (basedir)){
			string url = Path.GetFileName (dir);
			Node n = top.LookupNode ("Dir: " + url, url);
			PopulateDir (n, dir);
		}
	}
开发者ID:emtees,项目名称:old-code,代码行数:10,代码来源:simple-provider.cs

示例2: PopulateTree

	public override void PopulateTree (Tree tree)
	{
		ArrayList ns_dirs = new ArrayList ();
		foreach (string asm in asm_dirs) {
			ns_dirs.AddRange (Directory.GetDirectories (asm));
		}

		foreach (string ns in ns_dirs){
			string basedir = Directory.GetParent (ns).FullName;
			string [] files = Directory.GetFiles (ns);
			Node ns_node = null;
			string tn = null;
			
			Hashtable nsnodes = new Hashtable();

			foreach (string file in files){
				if (!file.EndsWith (".xml"))
					continue;

				if (ns_node == null) {
					tn = Path.GetFileName (ns);
					tree.HelpSource.Message (TraceLevel.Info, "Processing namespace {0}", tn);
					ns_node = tree.LookupNode (tn, "N:" + tn);
					string ns_summary_file = EcmaDoc.GetNamespaceFile (basedir, tn);
					
					nsnodes[ns_node] = nsnodes;
					
					if (File.Exists (ns_summary_file)) {
						XmlDocument nsSummaryFile = new XmlDocument ();
						nsSummaryFile.Load (ns_summary_file);
						namespace_realpath [tn] = ns_summary_file;
						
						XmlNode ns_summary = nsSummaryFile.SelectSingleNode ("Namespace/Docs/summary");
						if (ns_summary != null && ns_summary.InnerText.Trim () != "To be added." && ns_summary.InnerText != "") {
							namespace_summaries [tn]  = detached.ImportNode (ns_summary, true);
							namespace_remarks [tn]    = detached.ImportNode (nsSummaryFile.SelectSingleNode ("Namespace/Docs/remarks"), true);
						}
						
					} else if (!namespace_summaries.ContainsKey (tn)) {
						namespace_summaries [tn] = null;
						namespace_remarks [tn] = null;
					}
				}
				tree.HelpSource.Message (TraceLevel.Verbose, "    Processing input file {0}", Path.GetFileName (file));

				PopulateClass (tree, tn, ns_node, file);
			}
			
			// Sort the list of types in each namespace
			foreach (Node ns_node2 in nsnodes.Keys)
				ns_node2.Sort();
		}

	}
开发者ID:RAOF,项目名称:mono,代码行数:54,代码来源:ecma-provider.cs

示例3: CloseTree

		public override void CloseTree (HelpSource hs, Tree tree)
		{
			Hashtable entries = config.Compile ();
			MemoryStream ms = new MemoryStream ();
			XmlSerializer writer = new XmlSerializer (typeof (ErrorDocumentation));
			
			foreach (DictionaryEntry de in entries) {
				ErrorDocumentation d = (ErrorDocumentation)de.Value;
				string s = (string)de.Key;

				tree.LookupNode (s, "error:" + s);
				
				writer.Serialize (ms, d);
				ms.Position = 0;
				hs.PackStream (ms, s);
				ms.SetLength (0);
			}
			
			tree.Sort ();
		}
开发者ID:emtees,项目名称:old-code,代码行数:20,代码来源:error-provider.cs


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