public static void Main() { var config = (AgentConfigurationSection)ConfigurationManager.GetSection("agent"); var agent = new Agent(config); agent.Run(); Console.ReadLine(); agent.Stop(); }