public MonitorComsService(IServiceProvider serviceProvider, HostBuilderContext hostBuilderContext, GameHandlerService gameHandler, ServerTracker serverTracker, //EventHandlerService eventHandlerService, ILogger <IPCService> logger) { _serviceProvider = serviceProvider; _hostBuilderContext = hostBuilderContext; _gameHandler = gameHandler; _serverTracker = serverTracker; //_eventHandlerService = eventHandlerService; _logger = logger; parametersInit = true; Init(); }
public void InitServices(IServiceProvider services) { if (parametersInit) { return; } _serviceProvider = services; _hostBuilderContext = services.GetService <HostBuilderContext>(); _gameHandler = services.GetService <GameHandlerService>(); _serverTracker = services.GetService <ServerTracker>(); //_eventHandlerService = services.GetService<EventHandlerService>(); _logger = services.GetService <ILogger <IPCService> >(); parametersInit = true; Init(); }
public void Run(VgcApis.IService api) { orgSysProxySetting = Lib.Sys.ProxySetter.GetProxySetting(); this.vgcApi = api; var vgcSetting = api.GetVgcSettingService(); var vgcServer = api.GetVgcServersService(); pacServer = new PacServer(); setting = new PsSettings(); serverTracker = new ServerTracker(); // dependency injection setting.Run(vgcSetting); pacServer.Run(setting); serverTracker.Run(setting, pacServer, vgcServer); setting.DebugLog("call Luncher.run"); }
public void Run(VgcApis.Models.IServices.IApiService api) { orgSysProxySetting = Lib.Sys.ProxySetter.GetProxySetting(); VgcApis.Libs.Sys.FileLogger.Info("ProxySetter: save sys proxy settings"); this.vgcApi = api; var vgcSetting = api.GetSettingService(); var vgcServer = api.GetServersService(); pacServer = new PacServer(); setting = new PsSettings(); serverTracker = new ServerTracker(); // dependency injection setting.Run(vgcSetting); pacServer.Run(setting); serverTracker.Run(setting, pacServer, vgcServer); setting.DebugLog("call Luncher.run"); }