Granikos.SMTPSimulator.Service/Program.cs
/// <summary>
///     The main entry point for the application.
/// </summary>
The main entry point for the application.
The main entry point for the application .
private static void Main(string[] args)
        {
            var Logger = LogManager.GetLogger(typeof(Program));
            try
            {
                if (Environment.UserInteractive)
                {
                    var service = new SMTPSimulatorService();
                    service.TestStartupAndStop(args);
                }
                else
                {
                    ServiceBase[] ServicesToRun;
                    ServicesToRun = new ServiceBase[]
                    {
                        new SMTPSimulatorService()
                    };
                    ServiceBase.Run(ServicesToRun);
                }
            }
            catch (Exception e)
            {
                Logger.Error("An error occured.", e);
            }
        }
private static void Main ( string [ ] args ) { var Logger = LogManager . GetLogger ( typeof ( Program ) ) ; try { if ( Environment . UserInteractive ) { var service = new SMTPSimulatorService ( ) ; service . TestStartupAndStop ( args ) ; } else { ServiceBase [ ] ServicesToRun ; ServicesToRun = new ServiceBase [ ] { new SMTPSimulatorService ( ) } ; ServiceBase . Run ( ServicesToRun ) ; } } catch ( Exception e ) { Logger . Error ( " " , e ) ; } }
The main entry point for the application.
The main entry point for the application .
args
string[]