ATUAV_RT.Program.createWebService C# (CSharp) Method

createWebService() private static method

private static createWebService ( ) : void
return void
        private static void createWebService()
        {
            using (WebServiceHost host = new WebServiceHost(typeof(AtuavWebServiceImp), Settings.BaseAddress))
            {
                // Open the ServiceHost to start listening for messages. Since
                // no endpoints are explicitly configured, the runtime will create
                // one endpoint per base address for each service contract implemented
                // by the service.
                host.Open();

                Console.WriteLine("The service is ready at {0}", Settings.BaseAddress);
                Console.WriteLine("Press <Enter> to stop the service.");
                Console.ReadLine();

                // Close the ServiceHost.
                host.Close();
            }
        }