public graphNavigationResult(IEnumerable <T> startNodes, Boolean _includeStart) { foreach (T node in startNodes) { var thread = new graphNavigationThread <T>(node, _includeStart); threadsByStartNode.Add(node, thread); } }
public graphNavigationIteration <T> RunIteration(graphNavigationThread <T> thread) { var lastIteration = thread.LastOrDefault(); Int32 i = 0; graphNavigationIteration <T> newIteration = null; List <T> toNavigate = null; if (lastIteration == null) { lastIteration = new graphNavigationIteration <T>(); if (IncludeStartInResult) { lastIteration.Nodes.Add(thread.startNode); } else { lastIteration.Nodes.AddRange(Select(thread.startNode)); } thread.Add(lastIteration); } toNavigate = thread.StartNewIteration(); /* * * * newIteration = lastIteration.StartNewIteration(); * * foreach (T node in lastIteration.Nodes) * { * * } * * } * * if (i == 0) * { * * } */ lastIteration = newIteration; return(newIteration); }