private void ValidateCommandLineOptions(ApplicationCommandOptions options, IReporter reporter)
 {
     if (options.SignalRType == 1 && string.IsNullOrEmpty(options.ConnectionString))
     {
         var err = "Use ASRS but forget to set connection string!";
         reporter.Error(err);
         throw new InvalidOperationException(err);
     }
 }
 internal AppServer(ApplicationCommandOptions options, IConsole console)
 {
     _options  = options;
     _console  = console;
     _reporter = new ConsoleReporter(console)
     {
         IsQuiet   = options.Quiet,
         IsVerbose = options.Verbose,
     };
     ValidateCommandLineOptions(options, _reporter);
 }
        private AppServerConfig GetAppServerConfig(ApplicationCommandOptions option)
        {
            var config = new AppServerConfig()
            {
                SignalRType         = option.SignalRType,
                AccessTokenLifetime = option.AccessTokenLifetime,
                ConnectionNumber    = option.ServerConnectionNumber,
                ConnectionString    = option.ConnectionString,
                MinLogLevel         = option.MinLogLevel
            };

            return(config);
        }