private ReportSection CreateMainSection() { var section = new ReportSection() { Headings = new string[] { "User's Name", "Number of Messages" }, Content = countingResult }; return(section); }
public void AddSection(ReportSection section) { Debug.Assert(section != null, "section != null - section should not be null"); if (section == null) { throw new ArgumentNullException("section cannot be null."); } sections.Add(section); }
protected override ReportSection CreateMainSection() { var sortedContributions = contrinutions.OrderBy(item => item.Key); foreach (var record in sortedContributions) { reportContent.Add(new string[] { record.Key.ToString("HH"), record.Value.ToString() }); } var mainSection = new ReportSection() { Headings = new string[] { "Hour", "Number of Messages" }, Content = reportContent }; return(mainSection); }
protected override ReportSection CreateMainSection() { string date; var sortedContributions = contrinutions.OrderBy(record => record.Key); foreach (var record in sortedContributions) { date = GetFormattedDate(record.Key); reportContent.Add(new string[] { date, record.Value.ToString() }); } var mainSection = new ReportSection() { Headings = new string[] { "Month", "Number of Messages" }, Content = reportContent }; return(mainSection); }