public IProjectMonitor[] GetProjectStatusMonitors(ISingleServerMonitor[] serverMonitors)
        {
            int       indexRetval = 0;
            ArrayList indexList   = new ArrayList();

            for (int i = 0; i < Projects.Length; i++)
            {
                if (Projects[i].ShowProject)
                {
                    indexList.Add(i);
                }
            }

            IProjectMonitor[] retVal = new IProjectMonitor[indexList.Count];

            foreach (int i in indexList)
            {
                if (Projects[i].ShowProject)
                {
                    ICruiseProjectManager projectManager = cruiseProjectManagerFactory.Create(Projects[i], serverManagersList);
                    ISingleServerMonitor  serverMonitor  = GetServerMonitorForProject(Projects[i], serverMonitors);
                    retVal[indexRetval++] = new ProjectMonitor(Projects[i], projectManager, serverMonitor);
                }
            }

            return(retVal);
        }
Ejemplo n.º 2
0
 public IProjectMonitor[] GetProjectStatusMonitors()
 {
     IProjectMonitor[] retVal = new IProjectMonitor[Projects.Length];
     for (int i = 0; i < Projects.Length; i++)
     {
         Project project = Projects[i];
         ICruiseProjectManager projectManager = managerFactory.Create(project.ServerUrl, project.ProjectName);
         retVal[i] = new ProjectMonitor(projectManager);
     }
     return(retVal);
 }