本文整理汇总了C#中ILBlock.GetChildren方法的典型用法代码示例。如果您正苦于以下问题:C# ILBlock.GetChildren方法的具体用法?C# ILBlock.GetChildren怎么用?C# ILBlock.GetChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILBlock
的用法示例。
在下文中一共展示了ILBlock.GetChildren方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TransformBlock
Ast.BlockStatement TransformBlock(ILBlock block)
{
Ast.BlockStatement astBlock = new BlockStatement();
if (block != null) {
foreach(ILNode node in block.GetChildren()) {
astBlock.AddRange(TransformNode(node));
}
}
return astBlock;
}
示例2: TransformBlock
Ast.BlockStatement TransformBlock(ILBlock block)
{
Ast.BlockStatement astBlock = new BlockStatement();
if (block != null) {
astBlock.HiddenStart = NRefactoryExtensions.CreateHidden(block.ILRanges, astBlock.HiddenStart);
astBlock.HiddenEnd = NRefactoryExtensions.CreateHidden(block.EndILRanges, astBlock.HiddenEnd);
foreach(ILNode node in block.GetChildren()) {
astBlock.Statements.AddRange(TransformNode(node));
}
}
return astBlock;
}
示例3: TransformBlock
Ast.BlockStatement TransformBlock(ILBlock block)
{
Ast.BlockStatement astBlock = new BlockStatement();
if (block != null) {
astBlock.HiddenStart = NRefactoryExtensions.CreateHidden(!context.CalculateILRanges ? null : ILRange.OrderAndJoin(block.ILRanges), astBlock.HiddenStart);
astBlock.HiddenEnd = NRefactoryExtensions.CreateHidden(!context.CalculateILRanges ? null : ILRange.OrderAndJoin(block.EndILRanges), astBlock.HiddenEnd);
foreach(ILNode node in block.GetChildren()) {
var stmt = TransformNode(node);
if (stmt != null)
astBlock.Statements.Add(stmt);
}
}
return astBlock;
}
示例4: VisitBlock
protected virtual ILBlock VisitBlock(ILBlock block)
{
foreach (var child in block.GetChildren())
Visit(child);
return block;
}