public ServerMonitorSteamQueryViewModel(ServerInfo serverInfo, IIpService ipService) { _ipService = ipService; Host = serverInfo.Host; Port = serverInfo.SteamPort; OnPropertyChanged(nameof(Host)); OnPropertyChanged(nameof(Port)); ExcecuteCommand = new ActionCommand(() => Task.Run(() => { try { IsBisy = true; GetStat(); } finally { IsBisy = false; } }), () => { var iphost = Host; if (string.IsNullOrEmpty(iphost)) { return(false); } return(true); }); }
public HmaCliService(IIpService ipService, IEnumerable<string> ipExclusions, string hmaExePath, Logger log) { _ipService = ipService; _ipExclusions = ipExclusions; _hmaExePath = hmaExePath; _log = log; }
public BEService(IUnityContainer container, IIpService ipService, IEventAggregator eventAggregator) { _container = container; _ipService = ipService; _eventAggregator = eventAggregator; _eventAggregator.GetEvent <RunServerEvent>().Subscribe(CheckServer, ThreadOption.BackgroundThread); _eventAggregator.GetEvent <CloseServerEvent>().Subscribe(CloseServer, ThreadOption.BackgroundThread); }
public HmaService(IIpService ipService) { this.ipService = ipService; hmaEnabled = AppConfigHelper.GetAppSetting("HMA/Enabled", true); hmaOpenVpnServiceName = AppConfigHelper.GetAppSetting("HMA/OpenVpnServiceName"); hmaAppFullPath = AppConfigHelper.GetAppSetting("HMA/AppFullPath"); hmaAppProcessName = AppConfigHelper.GetAppSetting("HMA/AppProcessName"); stopIps = AppConfigHelper.GetAppSetting("StopIPs").Split(new char[]{','}).Select(x=>x.Trim()).ToList(); }
public PlayerViewModel(string userGuid, IIpService ipService, IPlayerRepository playerRepository) { _userGuid = userGuid; _ipService = ipService; _playerRepository = playerRepository; SaveComment = new ActionCommand(SaveUserComment); GoToSteamCommand = new ActionCommand(GoToSteam); }
public PlayerViewModel(string userGuid, IIpService ipService, IPlayerRepository playerRepository, IEventAggregator eventAggregator) { _userGuid = userGuid; _ipService = ipService; _playerRepository = playerRepository; _eventAggregator = eventAggregator; SaveComment = new ActionCommand(SaveUserComment); GoToSteamCommand = new ActionCommand(GoToSteam); BanCommand = new DelegateCommand <string>(BanPlayerView); }
public ServerMonitorManageServerViewModel(ServerInfoDto serverInfo, IEventAggregator eventAggregator, IIpService ipService) { _serverId = serverInfo.Id; _eventAggregator = eventAggregator; _ipService = ipService; _eventAggregator.GetEvent <BEMessageEvent <BEItemsMessage <Mission> > >().Subscribe(e => { if (e.ServerId == _serverId) { Missions = e.Items; } }); SetMissionCommand = new ActionCommand(() => { var m = SelectedMission; if (m != null && ConfirmNotSupported(CommandType.Mission)) { var mn = m.Name; SendCommand(CommandType.Mission, mn); } }, () => SelectedMission != null); RefreshCommand = new ActionCommand(() => SendCommand(CommandType.Missions)); InitCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.Init); }); ShutdownCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.Shutdown); }); ReassignCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.Reassign); }); RestartCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.Restart); }); RestartServerCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.RestartServer); }); LockCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.Lock); }); UnlockCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.Unlock); }); LoadBansCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.LoadBans); }); LoadScriptsCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.LoadScripts); }); LoadEventsCommand = new ActionCommand(() => { SendCommandWithConfirmation(CommandType.LoadEvents); }); ShowWarning = false; Task.Run(() => CheckServer(serverInfo)); }
public IpAddressController(IIpService ipService) { _ipService = ipService; }
public PlayerView() { _ipService = OnlinePlayersModuleInit.Current.Resolve <IIpService>(); _geoInfo = new Lazy <GeoInfo>(() => _ipService.GetGeoInfoLocal(IP)); }
public CertService(IIpService ipService, IIpSettingsModel ipSettings, IApplicationSettingsModel applicationSettingsModel) { _ipService = ipService; _ipSettings = ipSettings; _applicationSettingsModel = applicationSettingsModel; }
public TaterController(IOptionsMonitor <AppSettings> appSettings, ILogger <TaterController> logger, IIpService ipService) { _appSettings = appSettings.CurrentValue; _logger = logger; _ipService = ipService; }
public ClientIpFilter(ILogger <ClientIpFilter> logger, IIpService ipService, IConfiguration configuration) { _logger = logger; _ipService = ipService; _safeList = configuration["AdminSafeList"]; }
public IpController(IIpService service) { _service = service; }
public IpTest() { _ipService = ServiceProvider.GetRequiredService <IIpService>(); }
public HttpService(IIpService ipService) { _ipService = ipService; }
public IpController(IIpService ipService) { _ipService = ipService; }
public RequestOriginService(IIpService ipService) { _ipService = ipService; }