/// <summary> /// Remove containing paths. /// </summary> /// <param name="scaffoldPath">Current path.</param> /// <param name="path">Path to be compared with.</param> /// <returns>Containing paths or not.</returns> private static bool RemoveContainingPaths( ScaffoldPath scaffoldPath, ScaffoldPath path) { if (scaffoldPath.Count >= path.Count) { if (path.All(t => scaffoldPath.Where(k => k.Key == t.Key).ToList().Count > 0)) { return(true); } else { return(false); } } else { if (scaffoldPath.All(t => path.Where(k => k.Key == t.Key).ToList().Count > 0)) { scaffoldPath.Clear(); ((List <KeyValuePair <Node, Edge> >)scaffoldPath).AddRange(path); return(true); } else { return(false); } } }
/// <summary> /// Remove containing paths. /// </summary> /// <param name="scaffoldPath">Current path.</param> /// <param name="path">Path to be compared with.</param> /// <returns>Containing paths or not.</returns> private static bool RemoveContainingPaths( ScaffoldPath scaffoldPath, ScaffoldPath path) { if (scaffoldPath.Count >= path.Count) { if (path.All(t => scaffoldPath.Where(k => k.Key == t.Key).ToList().Count > 0)) { return(true); } return(false); } if (scaffoldPath.All(t => path.Where(k => k.Key == t.Key).ToList().Count > 0)) { scaffoldPath.Clear(); scaffoldPath.AddRange(path); return(true); } return(false); }