public FindBestMatch ( |
||
name | ||
Résultat |
public TreeNode FindBestMatch(ComponentName name)
{
if ("*".Equals(name.LiteralProperties))
{
return this;
}
else if (name.LiteralProperties == null || name.LiteralProperties == string.Empty)
{
return FindWithEmptyProperties();
}
else
{
return FindBestMatchByProperties(name);
}
}
internal TreeNode FindNode(ComponentName name) { TreeNode current = root; while (true) { int cmp = String.Compare(current.CompName.Service, name.Service); if (cmp < 0) { if (current.Left != null) { current = current.Left; } else { return(null); } } else if (cmp > 0) { if (current.Right != null) { current = current.Right; } else { return(null); } } else { return(current.FindBestMatch(name)); } } }