private ProjectStatus[] ConvertDashboardProjects(DashboardProject[] dashboardProjects) { ProjectStatus[] projectStatuses = null; if (dashboardProjects != null) { projectStatuses = new ProjectStatus[dashboardProjects.Length]; for (int index = 0; index < dashboardProjects.Length; index++) { DashboardProject dashboardProject = dashboardProjects[index]; projectStatuses[index] = new ProjectStatus( dashboardProject.name, dashboardProject.category, new ProjectActivity(dashboardProject.activity), (IntegrationStatus)Enum.Parse(typeof(IntegrationStatus), dashboardProject.lastBuildStatus), GetIntegratorStateFromString(dashboardProject.status), dashboardProject.webUrl, dashboardProject.lastBuildTime, dashboardProject.lastBuildLabel, dashboardProject.lastBuildLabel, dashboardProject.nextBuildTime, dashboardProject.buildStage, dashboardProject.queue, dashboardProject.queuePriority, dashboardProject.parameters); projectStatuses[index].ServerName = dashboardProject.serverName; } } return(projectStatuses); }
private ProjectStatus[] ConvertDashboardProjects(DashboardProject[] dashboardProjects) { ProjectStatus[] projectStatuses = null; if (dashboardProjects != null) { projectStatuses = new ProjectStatus[dashboardProjects.Length]; for (int index = 0; index < dashboardProjects.Length; index++) { DashboardProject dashboardProject = dashboardProjects[index]; projectStatuses[index] = new ProjectStatus( dashboardProject.name, dashboardProject.category, new ProjectActivity(dashboardProject.activity), (IntegrationStatus)Enum.Parse(typeof(IntegrationStatus), dashboardProject.lastBuildStatus), GetIntegratorStateFromString(dashboardProject.status), dashboardProject.webUrl, dashboardProject.lastBuildTime, dashboardProject.lastBuildLabel, dashboardProject.lastBuildLabel, dashboardProject.nextBuildTime, dashboardProject.buildStage, dashboardProject.queue, dashboardProject.queuePriority, dashboardProject.parameters); projectStatuses[index].ServerName = dashboardProject.serverName; } } return projectStatuses; }