public IEnumerable <TConnectionWay> GetConnectionWays(TValue value) { var childNode = root.GetNode(value); var valueIndices = ChildrenList.IndicesOf(childNode); foreach (var index in valueIndices) { if (index == -1) { throw new KeyNotFoundException(string.Format("Could not find child with value '{0}'.", value)); } yield return(ConnectionWays[index]); } }