public ServerContext([NotNull] CommandLineOptions startupOptions) { StartupOptions = startupOptions; if (startupOptions.Port > 0) { Options.ServerPort = startupOptions.Port; } ServerConsole = new ServerConsole(); ServerLogic = new ServerLogic(); RestApi = new RestApi(startupOptions.ApiPort); Network = CreateNetwork(); }
protected override void InternalStart() { try { InternalStartNetworking(); if (!StartupOptions.DoNotShowConsole) { ThreadConsole = ServerConsole.Start(); } ThreadLogic = ServerLogic.Start(); } catch (Exception exception) { Log.Error(exception); Dispose(); throw; } }