public bool TryGetValue(string[] searchValue, out Node <T> node) { foreach (var child in _children) { if (_comparer.Equals(child.Item1, searchValue)) { node = child.Item2; return(true); } } node = null; return(false); }
public Node <T> FindFirstNodeThatMatches(string[] route, int compareLength) { NodeComparer compare = new NodeComparer(compareLength); foreach (var kv in _children) { if (compare.Equals(kv.Key, route)) { return(kv.Value); } } return(null); }