Ejemplo n.º 1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            if (!Environment.UserInteractive)
            {
                var servicesToRun = new System.ServiceProcess.ServiceBase[]
                {
                    new eSignService()
                };

                System.ServiceProcess.ServiceBase.Run(servicesToRun);
            }
            else
            {
                using (var worker = new EmailChangeWorker())
                    worker.Do(10);
            }
        }
Ejemplo n.º 2
0
        private void EmailChange()
        {
            _logger.Info("emailChange");

            try
            {
                var top = 10;

                using (var worker = new EmailChangeWorker())
                {
                    var count = worker.Do(top);

                    if (top == count)
                    {
                        EmailChange();
                    }
                }
            }
            catch (Exception exc)
            {
                _logger.Error(exc);
            }
        }