示例#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);
     }
 }
示例#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);
 }
示例#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);
        }