Пример #1
0
 static XElement GetHtmlScrumBoardSection(ScrumSprint sprint, ScrumState state)
 {
     return new XElement(
         "div",
         new XAttribute("class", "scrum_board_section"),
         new XElement("h2", new XAttribute("id", sprint.States.IndexOf(state)), state.Name + " issues"),
         sprint.Issues.Where(i => state == sprint.GetStateOfIssue(i)).Select(GetHtmlScrumBoardIssue));
 }
Пример #2
0
 static IEnumerable<XElement> GetHtmlScrumBoardIssues(ScrumSprint sprint, ScrumState state)
 {
     return sprint.Issues.Where(i => state == sprint.GetStateOfIssue(i)).Select(GetHtmlScrumBoardIssue);
 }
Пример #3
0
 static XElement GetHtmlScrumBoard(ScrumSprint sprint)
 {
     return new XElement(
         "div",
         new XAttribute("class", "scrum_board"),
         new XElement("h1", sprint.Name+" Scrum Board"),
         new XElement(
             "table",
             new XElement(
                 "tr",
                 sprint.States.Select(s => new XElement(
                     "th",
                     String.Format(
                         "{0} [{1} issues] [{2:0.0} points]",
                         s.Name,
                         sprint.Issues.Count(i => s == sprint.GetStateOfIssue(i)),
                         sprint
                         .Issues
                         .Where(i => s == sprint.GetStateOfIssue(i))
                         .Select(i => i.GetScrumPoints())
                         .Select(p => p.HasValue?p.Value:0.0)
                         .Aggregate(0.0, (t,n)=> t+n))))),
             new XElement(
                 "tr",
                 sprint.States.Select(s => new XElement("td", GetHtmlScrumBoardIssues(sprint, s))))));
 }