コード例 #1
0
ファイル: Program.cs プロジェクト: bakhyt/rsoi-kursach
        static void Main(string[] args)
        {
            Config.Load();

            BillingService.DM = new DataModule();
            if (!BillingService.DM.Connect(Config.Server, Config.Base, Config.User, Config.Pass))
            {
                Console.WriteLine("Cant connect to MSSQL by {0} {1} {2} {3}",
                                  Config.Server, Config.Base, Config.User, Config.Pass);
                Console.ReadLine();
            }
            else
            {
                BillingService srv          = new BillingService();
                ServiceHost    _serviceHost = new ServiceHost(typeof(BillingService), new Uri(Config.ServiceURL));
                _serviceHost.AddServiceEndpoint(typeof(IBillingREST), new BasicHttpBinding(), "");
                _serviceHost.Open();
                Console.WriteLine("Service billing start");

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