public static void MatchTasks(IList <ITask> taskMainCollection, IMatchTasks taskMatcher) { for (int a = 0; a < taskMainCollection.Count - 1; a++) { for (int b = a + 1; b < taskMainCollection.Count; b++) { ITask taskA = taskMainCollection[a]; ITask taskB = taskMainCollection[b]; bool taskMatchingResult = taskMatcher.Match(taskA, taskB); if (taskMatchingResult) { taskA.AddMatchedTask(taskB); taskB.AddMatchedTask(taskA); } } } }
public static void MatchTasks(IList<ITask> taskMainCollection, IMatchTasks taskMatcher) { for (int a = 0; a < taskMainCollection.Count - 1; a++) { for (int b = a + 1; b < taskMainCollection.Count; b++) { ITask taskA = taskMainCollection[a]; ITask taskB = taskMainCollection[b]; bool taskMatchingResult = taskMatcher.Match(taskA, taskB); if (taskMatchingResult) { taskA.AddMatchedTask(taskB); taskB.AddMatchedTask(taskA); } } } }