.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
1.1 KiB

using System;
using System.Collections.Generic;
using Ast = ICSharpCode.NRefactory.Ast;
using Decompiler.ControlFlow;
namespace ICSharpCode.NRefactory.Ast
{
public class MyBlockStatement: BlockStatement
{
ChildrenCollection wrapper;
public class ChildrenCollection: System.Collections.ObjectModel.Collection<INode>
{
MyBlockStatement myStmt;
public void AddRange(IEnumerable<INode> items)
{
foreach(INode node in items) {
Add(node);
}
}
protected override void InsertItem(int index, INode item)
{
item.Parent = myStmt;
base.InsertItem(index, item);
}
protected override void SetItem(int index, INode item)
{
item.Parent = myStmt;
base.SetItem(index, item);
}
public ChildrenCollection(MyBlockStatement myStmt, IList<INode> nodes): base(nodes)
{
this.myStmt = myStmt;
}
}
public new ChildrenCollection Children {
get {
return wrapper;
}
}
public MyBlockStatement()
{
this.wrapper = new ChildrenCollection(this, base.Children);
}
}
}