Exemplo n.º 1
0
        static void Main()
        {
            Config = new ServiceConfig().Load();
            Logger = LogManager.GetCurrentClassLogger();

            try
            {
                Host = new WebHost();
                Host.Start();

                Logger.Trace("Сервис запущен");

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                Application.Run(new FormService());

                Logger.Trace("Сервис остановлен");
            }
            catch (Exception ex)
            {
                Program.Logger.Error(ex.Message);
                Application.Exit();
            }
        }
Exemplo n.º 2
0
        private ServiceConfig _getUndefinedConfig()
        {
            ServiceConfig conf = new ServiceConfig();
            conf.port = 80;
            conf.connectionString = "charset=WIN1251;datasource=localhost;database=ProfileCut;user=sysdba;password=masterkey";

            return conf;
        }