Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var host = new ServiceHost(typeof(StockService));

            host.Open();

            var queueListener = new QueueListener();

            queueListener.StartListening("request", true);

            Console.WriteLine("Press <Enter> to stop the services.");
            Console.ReadLine();

            queueListener.Dispose();
            host.Close();
        }
Exemplo n.º 2
0
 protected override void OnStop()
 {
     _queueListener.Dispose();
     _serviceHost.Close();
 }
Exemplo n.º 3
0
 protected void Application_End()
 {
     _queueListener.Dispose();
 }