protected override void OnStart(string[] args) { Task.Factory.StartNew(() => { consumer = new ConsumerAddClassification(ConfigCrawler.QueueAddClassification); consumer.StartConsume(); }); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main() { var consumer = new ConsumerAddClassification(ConfigCrawler.QueueAddClassification); consumer.StartConsume(); ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new ServiceAddClassification() }; ServiceBase.Run(ServicesToRun); }