示例#1
0
        public void StartAgent(Agent agent)
        {
            Console.WriteLine();
            Console.WriteLine("Type F to exit the automated build");
            Console.WriteLine();
            Thread.Sleep(1000);

            BuildAgent buildAgent = new BuildAgent();

            buildAgent.Build(agent);
        }
示例#2
0
        public void StartAgentQueueAsync()
        {
            if (_executedAgents.Count > 0)
            {
                IsRunningProcesses = true;
                Console.WriteLine();
                Console.WriteLine("Type F to exit the automated build");
                Console.WriteLine();
                Thread.Sleep(1000);

                BuildAgent buildAgent = new BuildAgent();
                foreach (Agent agent in _executedAgents)
                {
                    Task task = Task.Run(() => buildAgent.Build(agent));
                    _agentTasks.Add(task);
                }
                Task.WaitAll(_agentTasks.ToArray());
            }
            else
            {
                Console.WriteLine();
                Console.WriteLine("No agent in queue.");
            }
        }