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


C# Node.LookupNode方法代码示例

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


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

示例1: PopulateNode

	void PopulateNode (XPathNodeIterator nodes, Node treeNode)
	{
		while (nodes.MoveNext ()) {
			XPathNavigator n = nodes.Current;
			string secNumber = n.GetAttribute ("number", ""),
				secName = n.GetAttribute ("name", "");
			
			treeNode.tree.HelpSource.Message (TraceLevel.Info, "\tSection: " + secNumber);
			treeNode.tree.HelpSource.PackFile (Path.Combine (basedir, secNumber + ".xml"), secNumber);
			Node thisNode = treeNode.LookupNode (secNumber + ": " + secName, "ecmaspec:" + secNumber);
			
			if (n.HasChildren)
				PopulateNode (n.SelectChildren ("node", ""), thisNode);
		}
	}
开发者ID:carrie901,项目名称:mono,代码行数:15,代码来源:ecmaspec-provider.cs

示例2: PopulateDir

#pragma warning disable 219
	void PopulateDir (Node me, string dir)
	{
		Console.WriteLine ("Adding: " + dir);
		foreach (string child_dir in Directory.GetDirectories (dir)){
			string url = Path.GetFileName (child_dir);
			Node n = me.LookupNode ("Dir: " + url, "simple-directory:" + url);
			PopulateDir (me, child_dir);
		}

		foreach (string file in Directory.GetFiles (dir)){
			Console.WriteLine ("   File: " + file);
			string file_code = me.tree.HelpSource.PackFile (file);

			//
			// The url element encoded for the file is:
			//  originalfilename#CODE
			//
			// The code is assigned to us after the file has been packaged
			// We use the original-filename later to render html or text files
			//
			Node n = me.LookupNode (Path.GetFileName (file), file + "#" + file_code);
			
		}
	}
开发者ID:emtees,项目名称:old-code,代码行数:25,代码来源:simple-provider.cs

示例3: PopulateClass

	void PopulateClass (Tree tree, string ns, Node ns_node, string file)
	{
		XmlDocument doc = new XmlDocument ();
		doc.Load (file);
		
		string name = EcmaDoc.GetClassName (doc);
		string assembly = EcmaDoc.GetClassAssembly (doc);
		string kind = EcmaDoc.GetTypeKind (doc);
		string full = EcmaDoc.GetFullClassName (doc);

		Node class_node;
		string file_code = ns_node.tree.HelpSource.PackFile (file);

		XmlNode class_summary = detached.ImportNode (doc.SelectSingleNode ("/Type/Docs/summary"), true);
		ArrayList l = (ArrayList) class_summaries [ns];
		if (l == null){
			l = new ArrayList ();
			class_summaries [ns] = (object) l;
		}
		l.Add (new TypeInfo (kind, assembly, full, name, class_summary));
	       
		class_node = ns_node.LookupNode (String.Format ("{0} {1}", name, kind), "ecma:" + file_code + "#" + name + "/");
		
		if (kind == "Delegate") {
			if (doc.SelectSingleNode("/Type/ReturnValue") == null)
				tree.HelpSource.Message (TraceLevel.Error, "Delegate " + name + " does not have a ReturnValue node.  See the ECMA-style updates.");
		}

		if (kind == "Enumeration")
			return;

		if (kind == "Delegate")
			return;
		
		//
		// Always add the Members node
		//
		class_node.CreateNode ("Members", "*");

		PopulateMember (doc, name, class_node, "Constructor", "Constructors");
		PopulateMember (doc, name, class_node, "Method", "Methods");
		PopulateMember (doc, name, class_node, "Property", "Properties");
		PopulateMember (doc, name, class_node, "Field", "Fields");
		PopulateMember (doc, name, class_node, "Event", "Events");
		PopulateMember (doc, name, class_node, "Operator", "Operators");
	}
开发者ID:RAOF,项目名称:mono,代码行数:46,代码来源:ecma-provider.cs

示例4: Populate

	void Populate (Node parent, XmlNodeList xml_node_list)
	{
		foreach (XmlNode xml_node in xml_node_list){
			XmlAttribute e = xml_node.Attributes ["parent"];
			if (e != null && name_to_node.ContainsKey (e.InnerText)) {
				Node p = (Node) name_to_node [e.InnerText];
				xml_node.Attributes.Remove (e);
				Populate (p, xml_node.SelectNodes ("."));
				continue;
			}
			e = xml_node.Attributes ["label"];
			if (e == null){
				Console.Error.WriteLine ("`label' attribute missing in <node>");
				continue;
			}
			string label = e.InnerText;
			e = xml_node.Attributes ["name"];
			if (e == null){
				Console.Error.WriteLine ("`name' attribute missing in <node>");
				continue;
			}
			string name = e.InnerText;

			Node n = parent.LookupNode (label, "root:/" + name);
			n.EnsureNodes ();
			name_to_node [name] = n;
			XmlNodeList children = xml_node.SelectNodes ("./node");
			if (children != null)
				Populate (n, children);
		}
	}
开发者ID:wamiq,项目名称:debian-mono,代码行数:31,代码来源:provider.cs


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