本文整理汇总了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);
}
示例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;
}
示例3: GetExamplesNodes
public static NodeCollection GetExamplesNodes()
{
var nodes = new NodeCollection();
string path = HttpContext.Current.Server.MapPath(ExamplesModel.ExamplesRoot);
return ExamplesModel.BuildAreasLevel();
}
示例4: PPPragmaNode
public PPPragmaNode(IdentifierExpression identifier, NodeCollection<ConstantExpression> value, PragmaAction action)
: base(identifier.RelatedToken)
{
this.identifier = identifier;
this.value = value;
this.Action = action;
}
示例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);
}
示例6: ForStatement
public ForStatement(Token relatedToken)
: base(relatedToken)
{
_blockStatement = new BlockStatement(relatedToken);
_init = new NodeCollection<ExpressionNode>();
_inc = new NodeCollection<ExpressionNode>();
}
示例7: CompilationUnitNode
public CompilationUnitNode()
: base(new Token(TokenID.Invalid, 0, 0))
{
namespaces = new NodeCollection<NamespaceNode>();
defaultNamespace = new NamespaceNode(RelatedToken);
}
示例8: EvalCollection
private void EvalCollection(IContext context, NodeCollection<ExpressionNode> collection, Stream writer)
{
foreach (ExpressionNode node in collection)
{
node.Execute(context, writer);
}
}
示例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();
}
示例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;
}
示例11: Scene
public Scene()
{
_renderableNodes = new NodeCollection();
_flatNodes = new NodeCollection();
_environmentalNodes = new NodeCollection();
AmbientColor = Color.FromArgb(0xff, 0x3f, 0x3f, 0x3f);
}
示例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>();
}
示例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);
}
}
示例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));
}
示例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();
}