private List<Paragraph> findMatching(ParagraphCondition condition) { List<Paragraph> retVal = new List<Paragraph>(); foreach (Paragraph p in Paragraphs.Values) { if (condition(p)) { retVal.Add(p); } } return retVal; }