using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using ContosoPizzaLibrary;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;

namespace ContosoServiceHost
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceHost host = new ServiceHost(typeof(PizzaService));
            host.Open();

            Console.WriteLine("****** V1 PizzaService *****\n");
            Console.WriteLine("{0} is up and running with these listeners:", host.Description.ServiceType);
            foreach (ChannelDispatcher cd in host.ChannelDispatchers)
                Console.WriteLine(cd.Listener.Uri);
            Console.WriteLine();

            Console.ReadLine();
            host.Close();
        }
    }
}
