public int GetAverageBuildTime(string projectName) { //var sums = _client.GetBuildSummaries(projectName, 0, 5); var names = _client.GetMostRecentBuildNames(projectName, 5); var statuses = names.Select(n => _client.GetFinalBuildStatus(projectName, n)).ToArray(); //var snap = _client.(projectName); //if ((!snap.TimeCompleted.HasValue) || (!snap.TimeStarted.HasValue)) return 0; //return Convert.ToInt32((snap.TimeCompleted.Value - snap.TimeStarted.Value).TotalSeconds); //var ps = _farmsvc.GetProjectStatusListAndCaptureExceptions(_location, null); //return ps.StatusAndServerList.Select(sos => sos.ProjectStatus); return(0); }