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


C# NodeCollection类代码示例

本文整理汇总了C#中NodeCollection的典型用法代码示例。如果您正苦于以下问题:C# NodeCollection类的具体用法?C# NodeCollection怎么用?C# NodeCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: GetNodes

        public ActionResult GetNodes(string node)
        {
            if (!string.IsNullOrEmpty(node))
            {
                NodeCollection nodes = new NodeCollection();
                SiteMapNode siteMapNode = SiteMap.Provider.FindSiteMapNodeFromKey(node);

                if (siteMapNode == null)
                {
                    return this.Store(nodes);
                }

                SiteMapNodeCollection children = siteMapNode.ChildNodes;

                if (children != null && children.Count > 0)
                {
                    foreach (SiteMapNode mapNode in siteMapNode.ChildNodes)
                    {
                        nodes.Add(NodeHelper.CreateNodeWithOutChildren(mapNode));
                    }
                }

                return this.Store(nodes);
            }

            return new HttpStatusCodeResult(500);
        }
开发者ID:shalves,项目名称:Ext.NET.Community,代码行数:27,代码来源:DragDrop_Between_TreesController.cs

示例2: SolverValidator

 public SolverValidator(Solver solver, NodeCollection nodes, Node root, IPositionLookupTable<Node> transpositionTable)
 {
     this.solver = solver;
     this.nodes = nodes;
     this.root = root;
     this.transpositionTable = transpositionTable;
 }
开发者ID:ricksladkey,项目名称:Sokoban,代码行数:7,代码来源:SolverValidator.cs

示例3: GetExamplesNodes

        public static NodeCollection GetExamplesNodes()
        {
            var nodes = new NodeCollection();
            string path = HttpContext.Current.Server.MapPath(ExamplesModel.ExamplesRoot);

            return ExamplesModel.BuildAreasLevel();
        }
开发者ID:extnet,项目名称:Ext.NET.Examples.MVC,代码行数:7,代码来源:ExamplesModel.cs

示例4: PPPragmaNode

        public PPPragmaNode(IdentifierExpression identifier, NodeCollection<ConstantExpression> value, PragmaAction action)
            : base(identifier.RelatedToken)
		{
			this.identifier = identifier;
            this.value = value;
            this.Action = action;
		}
开发者ID:debreuil,项目名称:CSharpParser,代码行数:7,代码来源:PPPragmaNode.cs

示例5: CompilationUnitNode

		public CompilationUnitNode(): base(new Token( TokenID.Invalid, 0, 0) )
		{
			this.globalAttributes = new NodeCollection<AttributeNode>();
            this.namespaces = new NodeCollection<NamespaceNode>();

            this.defaultNamespace = new NamespaceNode(RelatedToken);
		}
开发者ID:mintberry,项目名称:stackrecaller,代码行数:7,代码来源:CompilationUnitNode.cs

示例6: ForStatement

 public ForStatement(Token relatedToken)
     : base(relatedToken)
 {
     _blockStatement = new BlockStatement(relatedToken);
     _init = new NodeCollection<ExpressionNode>();
     _inc = new NodeCollection<ExpressionNode>();
 }
开发者ID:yslib,项目名称:minimvc,代码行数:7,代码来源:ForStatement.cs

示例7: CompilationUnitNode

    public CompilationUnitNode()
      : base(new Token(TokenID.Invalid, 0, 0))
    {
      namespaces = new NodeCollection<NamespaceNode>();

      defaultNamespace = new NamespaceNode(RelatedToken);
    }
开发者ID:andyhebear,项目名称:Csharp-Parser,代码行数:7,代码来源:CompilationUnitNode.cs

示例8: EvalCollection

 private void EvalCollection(IContext context, NodeCollection<ExpressionNode> collection, Stream writer)
 {
     foreach (ExpressionNode node in collection)
     {
         node.Execute(context, writer);
     }
 }
开发者ID:yslib,项目名称:minimvc,代码行数:7,代码来源:ForStatement.cs

示例9: GetNodes

        public string GetNodes(string node)
        {
            NodeCollection nodes = new NodeCollection(false);

            if (!string.IsNullOrEmpty(node))
            {
                for (int i = 1; i < 6; i++)
                {
                    Node asyncNode = new Node();
                    asyncNode.Text = node + i;
                    asyncNode.NodeID = node + i;
                    nodes.Add(asyncNode);
                }

                for (int i = 6; i < 11; i++)
                {
                    Node treeNode = new Node();
                    treeNode.Text = node + i;
                    treeNode.NodeID = node + i;
                    treeNode.Leaf = true;
                    nodes.Add(treeNode);
                }
            }

            return nodes.ToJson();
        }
开发者ID:extnet,项目名称:Ext.NET.Examples,代码行数:26,代码来源:TreeJsonService.asmx.cs

示例10: BuildFirstLevel

        public static NodeCollection BuildFirstLevel()
        {
            string path = HttpContext.Current.Server.MapPath("~/Examples/");
            DirectoryInfo root = new DirectoryInfo(path);
            DirectoryInfo[] folders = root.GetDirectories();
            folders = UIHelpers.SortFolders(root, folders);

            NodeCollection nodes = new NodeCollection(false);

            foreach (DirectoryInfo folder in folders)
            {
                if ((folder.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden ||
                    excludeList.Contains(folder.Name) || folder.Name.StartsWith("_"))
                {
                    continue;
                }

                ExampleConfig cfg = new ExampleConfig(folder.FullName + "\\config.xml", false);

                string iconCls = string.IsNullOrEmpty(cfg.IconCls) ? "" : cfg.IconCls;
                Node node = new Node();

                node.Text = UIHelpers.MarkNew(folder.FullName, folder.Name.Replace("_", " "));
                node.IconCls = iconCls;

                string url = UIHelpers.PhysicalToVirtual(folder.FullName + "/");
                node.NodeID = "e" + Math.Abs(url.ToLower().GetHashCode());

                nodes.Add(node);
            }

            return nodes;
        }
开发者ID:shalves,项目名称:Ext.NET.Community,代码行数:33,代码来源:UIHelpers.cs

示例11: Scene

		public Scene()
		{
			_renderableNodes = new NodeCollection();
			_flatNodes = new NodeCollection();
			_environmentalNodes = new NodeCollection();

			AmbientColor = Color.FromArgb(0xff, 0x3f, 0x3f, 0x3f);
		}
开发者ID:tekbob27,项目名称:Balder,代码行数:8,代码来源:Scene.cs

示例12: Report

        //PageHeader
        //PageFooter
        //InteractiveHeight
        //InteractiveWidth
        //EmbeddedImages
        //CodeModules
        //Classes
        //DataTransform

        public Report()
        {

            this.DataSources = new NodeCollection<DataSource>();
            this.DataSets = new NodeCollection<XDataSet>();
            this.EmbeddedImages = new NodeCollection<EmbeddedImage>();
            this.ReportParameters = new NodeCollection<ReportParameter>();
        }
开发者ID:saveenr,项目名称:saveenr,代码行数:17,代码来源:Report.cs

示例13: FlattenChildren

 /// <summary>
 /// Get all the children recursive and flattens it into the given list.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="listToFill">The list to fill.</param>
 private void FlattenChildren(Node parent, ref NodeCollection listToFill)
 {
     listToFill.Add(parent);
     foreach (var child in parent.Children)
     {
         this.FlattenChildren(child, ref listToFill);
     }
 }
开发者ID:xxy1991,项目名称:cozy,代码行数:13,代码来源:Node.cs

示例14: Element

        public Element(string name, string text, params IAttribute[] attributes)
        {
            this._Name = name;
            this._Attributes = new AttributeCollection(attributes);
            this._Children = new NodeCollection(new Text(text));

            
        }
开发者ID:rportela,项目名称:com.eixox.csharp.core,代码行数:8,代码来源:Element.cs

示例15: Table

 public Table()
 {
     this.Header = new Header();
     this.Details = new Details();
     this.TableColumns = new NodeCollection<TableColumn>();
     this.TableGroups = new NodeCollection<TableGroup>(); 
     this.Style = new Style();
 }
开发者ID:saveenr,项目名称:saveenr,代码行数:8,代码来源:Table.cs


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