protected virtual NodeSource Find(IList<QualifiedName> relativePath, int index)
{
// check for end of path.
if (index < 0 || index >= relativePath.Count)
{
return null;
}
QualifiedName browseName = relativePath[index];
// follow forward references to child.
foreach (NodeSource child in m_children)
{
if (child.BrowseName != browseName)
{
continue;
}
if (index == relativePath.Count-1)
{
return child;
}
return child.Find(relativePath, ++index);
}
// nothing found.
return null;
}