public CaptureService() { XmlConfigurator.Configure(); InitializeComponent(); _processor = new Processor(ConfigurationManager.AppSettings["postUrl"]); _udpServer = new UdpListener(_processor.ProcessRawMeasurement); Log.Info("Finished startup."); }
static void Main(string[] args) { XmlConfigurator.Configure(); var p = new Processor(ConfigurationManager.AppSettings["postUrl"]); var server = new UdpListener(p.ProcessRawMeasurement); server.Start(); Console.WriteLine("Press any key to shutdown."); Console.ReadKey(); server.Stop(); }