Example #1
0
 public TeamProjectActivityInfo(string teamProject, int numberOfActivities, IEnumerable <ComponentActivityInfo> sourceControlActivities, IEnumerable <ComponentActivityInfo> workItemTrackingActivities, IEnumerable <ComponentActivityInfo> teamBuildActivities)
 {
     this.TeamProject                        = teamProject;
     this.SourceControlActivities            = (sourceControlActivities ?? new ComponentActivityInfo[0]).OrderByDescending(a => a.Time).ToArray();
     this.WorkItemTrackingActivities         = (workItemTrackingActivities ?? new ComponentActivityInfo[0]).OrderByDescending(a => a.Time).ToArray();
     this.TeamBuildActivities                = (teamBuildActivities ?? new ComponentActivityInfo[0]).OrderByDescending(a => a.Time).ToArray();
     this.MostRecentSourceControlActivity    = this.SourceControlActivities.FirstOrDefault();
     this.MostRecentWorkItemTrackingActivity = this.WorkItemTrackingActivities.FirstOrDefault();
     this.MostRecentTeamBuildActivity        = this.TeamBuildActivities.FirstOrDefault();
     this.AllActivities                      = this.SourceControlActivities.Concat(this.WorkItemTrackingActivities).Concat(this.TeamBuildActivities).OrderByDescending(a => a.Time).Take(numberOfActivities).ToArray();
     this.MostRecentActivity                 = this.AllActivities.FirstOrDefault();
 }
Example #2
0
 public TeamProjectActivityInfo(string teamProject, IList <ComponentActivityInfo> activities)
 {
     this.TeamProject        = teamProject;
     this.Activities         = (activities ?? new ComponentActivityInfo[0]).OrderByDescending(a => a.Time).ToArray();
     this.MostRecentActivity = this.Activities.FirstOrDefault();
 }