Ejemplo n.º 1
0
        public static bool ChooseAgent(Client client)
        {
            var agents = new AgentRepository().GetAll().ToArray();
            int agentId;

            Random randomize    = new Random();
            int    indexOfAgent = randomize.Next(0, agents.Count() - 1);

            agentId = agents[indexOfAgent].id;

            return(AgentLogic.Apply(client, agentId));
        }
        public static bool ChooseAgent(Client client)
        {
            var agents = new AgentRepository().GetAll().ToArray();
            int agentId;

            Random randomize = new Random();
            int indexOfAgent = randomize.Next(0, agents.Count() - 1);

            agentId = agents[indexOfAgent].id;

            return AgentLogic.Apply(client, agentId);
        }