public string Format(Comment comment) { foreach (var step in Formatters) { if (step.Criteria(comment)) return step.Action(comment); } return null; }
/// <summary> /// Returns the comments in a format suitable for display /// </summary> /// <param name="comment"></param> /// <returns></returns> public string Format(Comment comment) { return Formatter.Format(comment); }
string FormatGeneralContainer(Comment comment) { return FormatChildren(comment.Children); }
public void AddChild(Comment comment) { children.Add(comment); }