using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using DemoServices.ServiceImplementations;
using System.ServiceModel.Description;

namespace DemoServicesHosts.ReverseForRouting
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("ReverseForRouting Host starting");
            using (ServiceHost host = new ServiceHost(typeof(ReverseService),
                new Uri("net.tcp://localhost:7001/DemoServices/ReverseService")))
            {
                host.Open();
                foreach (ServiceEndpoint se in host.Description.Endpoints)
                {
                    Console.WriteLine("\nAddress: {0}, \n\tBinding: {1}, \n\tContract: {2}", se.Address, se.Binding.Name, se.Contract.Name);
                }

                Console.WriteLine("ReverseForRouting Host started. Press enter to stop.");
                Console.ReadLine();
            }
        }
    }
}
