Example #1
0
 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);
     }
 }
Example #2
0
 internal AppServer(ApplicationCommandOptions options, IConsole console)
 {
     _options  = options;
     _console  = console;
     _reporter = new ConsoleReporter(console)
     {
         IsQuiet   = options.Quiet,
         IsVerbose = options.Verbose,
     };
     ValidateCommandLineOptions(options, _reporter);
 }
Example #3
0
        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);
        }