public void SetTesterCommentBL(string comm, Test test)//its sets testers comment, if ther is a comment already then it adds it to the existing comment //we use here a anonomys delegate { GetsTestToCheck nc = delegate(Test t) { if (t.TesterComment != null) { return(true); } else { return(false); } }; bool help = nc(test); if (help) { test.TesterComment += comm; } else { test.TesterComment = comm; } }
public List <Test> ReturnListThatAnswersToTheDelegetQuestion(GetsTestToCheck CheckMethod) { IEnumerable <Test> testsList = dal.getTestsDAL(); if (testsList.Count() == 0) { return(null); } List <Test> testsThatAnswerdToQuestion = new List <Test>(); foreach (Test element in testsList) { if (CheckMethod(element)) { testsThatAnswerdToQuestion.Add(element); } } return(testsThatAnswerdToQuestion); }