static void Main() { try { log.Info("Running...."); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (IApplicationContext ctx = ContextRegistry.GetContext()) { StockForm stockForm = new StockForm(); Application.ThreadException += ThreadException; Application.Run(stockForm); } } catch (Exception e) { log.Error("Spring.RabbitQuickStart.Client is broken.", e); } }
static void Main() { try { log.Info("Running...."); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (IApplicationContext ctx = ContextRegistry.GetContext()) { //Autostart should be used in messaging.xml instead Spring.Messaging.Amqp.Rabbit.Listener.SimpleMessageListenerContainer container = ContextRegistry.GetContext().GetObject("MessageListenerContainer") as Spring.Messaging.Amqp.Rabbit.Listener.SimpleMessageListenerContainer; container.Start(); StockForm stockForm = new StockForm(); Application.ThreadException += ThreadException; Application.Run(stockForm); } } catch (Exception e) { log.Error("Spring.RabbitQuickStart.Client is broken.", e); } }