private _locateTarget ( IList |
||
nodes | IList |
|
target | string | |
return | List |
private List<AbstractNode> _locateTarget( IList<AbstractNode> nodes, string target )
{
AbstractNode iter = null;
// Search for a top-level object node
foreach ( AbstractNode node in nodes )
{
if ( node is ObjectAbstractNode )
{
ObjectAbstractNode impl = (ObjectAbstractNode)node;
if ( impl.Name == target )
iter = node;
}
}
List<AbstractNode> newNodes = new List<AbstractNode>();
if ( iter != null )
{
newNodes.Add( iter );
}
return newNodes;
}