Ejemplo n.º 1
0
        public static int GetNumberOfBusyPes(this List <Host> hostList)
        {
            int numberOfBusyPes = 0;

            foreach (Host host in hostList)
            {
                numberOfBusyPes += PeList.GetNumberOfBusyPes(host.PeList);
            }
            return(numberOfBusyPes);
        }
Ejemplo n.º 2
0
 public static Host GetHostWithFreePe(this List <Host> hostList, int pesNumber)
 {
     foreach (Host host in hostList)
     {
         if (PeList.GetNumberOfFreePes(host.PeList) >= pesNumber)
         {
             return(host);
         }
     }
     return(null);
 }