本文整理汇总了C#中INode.ForEachChild方法的典型用法代码示例。如果您正苦于以下问题:C# INode.ForEachChild方法的具体用法?C# INode.ForEachChild怎么用?C# INode.ForEachChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类INode
的用法示例。
在下文中一共展示了INode.ForEachChild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buildStep
private ITestPart buildStep(INode node)
{
var step = new Step(node.Name);
node.ForEachAttribute(step.Set);
node.ForEachChild(sectionNode => addChildSteps(step, sectionNode));
return step;
}
示例2: addChildSteps
private void addChildSteps(IStep parent, INode sectionNode)
{
StepLeaf childSteps = parent.LeafFor(sectionNode.Name);
sectionNode.ForEachChild(childStepNode =>
{
ITestPart child = ReadPart(childStepNode);
childSteps.Add(child);
});
}
示例3: ReadSection
public Section ReadSection(INode element)
{
var section = new Section(element.Name);
var adder = new SectionAdder(section);
element.ForEachChild(node =>
{
ITestPart part = ReadPart(node);
part.AcceptVisitor(adder);
});
return section;
}
示例4: ReadTest
public Test ReadTest(INode element)
{
Test test = CreateTest(element, new DefaultTestPartcollection());
element.ForEachChild(node => { readFromChildNode(node, test); });
return test;
}
示例5: ReadTest
public Test ReadTest(INode element)
{
var test = new Test(element["name"]);
readLifecycle(test, element);
element.ForEachChild(node => { readFromChildNode(node, test); });
return test;
}