public SyncProfiles( Common.Configuration.Config appConfig, ILogger logger, IAppSettings appSettings, Profiles profiles, CachedProfiles cachedProfiles, ApiProfiles apiProfiles, SyncProfile syncProfile) { _appConfig = appConfig; _logger = logger; _appSettings = appSettings; _profiles = profiles; _cachedProfiles = cachedProfiles; _apiProfiles = apiProfiles; _syncProfile = syncProfile; _syncAction = new CoalescingAction(SyncAction); _syncAction.Completed += OnSyncCompleted; _timer = new System.Timers.Timer { Interval = _appConfig.ProfileSyncTimerPeriod.RandomizedWithDeviation(0.2).TotalMilliseconds, AutoReset = true }; _timer.Elapsed += (s, e) => OnTimerElapsed(); }
public LoginViewModel( Common.Configuration.Config appConfig, LoginWindowViewModel loginWindowViewModel, IActiveUrls urls, IAppSettings appSettings, LoginErrorViewModel loginErrorViewModel, UserAuth userAuth, IModals modals, GuestHoleConnector guestHoleConnector, GuestHoleState guestHoleState) { _appConfig = appConfig; _userAuth = userAuth; _appSettings = appSettings; _urls = urls; _modals = modals; _loginWindowViewModel = loginWindowViewModel; _guestHoleConnector = guestHoleConnector; _guestHoleState = guestHoleState; LoginErrorViewModel = loginErrorViewModel; LoginCommand = new RelayCommand(LoginAction); RegisterCommand = new RelayCommand(RegisterAction); HelpCommand = new RelayCommand(HelpAction); ToggleHelpBalloon = new RelayCommand(ToggleBalloonAction); ResetPasswordCommand = new RelayCommand(ResetPasswordAction); ForgotUsernameCommand = new RelayCommand(ForgotUsernameAction); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitchAction); }
public void Prepare_ShouldCreate_TlsExportCertFolder() { // Arrange const string path = nameof(Prepare_ShouldCreate_TlsExportCertFolder); if (Directory.Exists(path)) { Directory.Delete(path); } var config = new Common.Configuration.Config { ServiceLogFolder = $"{path}-1", OpenVpn = { TlsExportCertFolder = path } }; var subject = new ConfigDirectories(config); // Act subject.Prepare(); // Assert Directory.Exists(path).Should().BeTrue(); }
public VpnReconnector(IAppSettings appSettings, ISimilarServerCandidatesGenerator similarServerCandidatesGenerator, IModals modals, IPopupWindows popups, IVpnConnector vpnConnector, INotificationSender notificationSender, ILogger logger, ServerCandidatesFactory serverCandidatesFactory, Common.Configuration.Config config, Lazy <ConnectionStatusViewModel> connectionStatusViewModel, ServerManager serverManager, Lazy <ServerConnector> serverConnector, Lazy <ProfileConnector> profileConnector) { _appSettings = appSettings; _similarServerCandidatesGenerator = similarServerCandidatesGenerator; _modals = modals; _popups = popups; _vpnConnector = vpnConnector; _notificationSender = notificationSender; _logger = logger; _serverCandidatesFactory = serverCandidatesFactory; _config = config; _connectionStatusViewModel = connectionStatusViewModel; _serverManager = serverManager; _serverConnector = serverConnector; _profileConnector = profileConnector; }
public MonitoredVpnService(Common.Configuration.Config appConfig, VpnSystemService service) { _service = service; _timer.Interval = appConfig.ServiceCheckInterval; _timer.Tick += OnTimerTick; }
private SyncProfile(Common.Configuration.Config appConfig, ILogger logger, CachedProfiles cachedProfiles, IProfileStorageAsync apiProfiles) { _appConfig = appConfig; _logger = logger; _cachedProfiles = cachedProfiles; _apiProfiles = apiProfiles; }
public VpnConfig(IApiClient apiClient, Common.Configuration.Config config) { _apiClient = apiClient; TcpPorts = config.DefaultOpenVpnTcpPorts; UdpPorts = config.DefaultOpenVpnUdpPorts; BlackHoleIps = config.DefaultBlackHoleIps; }
public VpnCredentialProvider(Common.Configuration.Config config, IAppSettings appSettings, IUserStorage userStorage) { _config = config; _userStorage = userStorage; _appSettings = appSettings; }
public FormViewModel( Common.Configuration.Config appConfig, IUserStorage userStorage, SystemState systemState) { _systemState = systemState; _appConfig = appConfig; _userStorage = userStorage; }
public CurrentNetworkInterface( Common.Configuration.Config config, IServiceSettings serviceSettings, INetworkInterfaceLoader networkInterfaceLoader) { _config = config; _serviceSettings = serviceSettings; _networkInterfaceLoader = networkInterfaceLoader; }
public NetworkSettings( ILogger logger, INetworkInterfaces networkInterfaces, Common.Configuration.Config config) { _config = config; _logger = logger; _networkInterfaces = networkInterfaces; }
public SecureCoreProfileFormViewModel( Common.Configuration.Config appConfig, ColorProvider colorProvider, IUserStorage userStorage, ServerManager serverManager, ProfileManager profileManager, IModals modals, IDialogs dialogs) : base(appConfig, colorProvider, userStorage, profileManager, dialogs, modals, serverManager) { }
public SettingsStorage(ILogger logger, ITextSerializerFactory serializers, Common.Configuration.Config config) { _origin = new SafeStorage <SettingsContract>( new LoggingStorage <SettingsContract>( logger, new FileStorage <SettingsContract>( serializers, config.ServiceSettingsFilePath))); }
public VpnConfig(IApiClient apiClient, Common.Configuration.Config config) { _apiClient = apiClient; TcpPorts = config.DefaultOpenVpnTcpPorts; UdpPorts = config.DefaultOpenVpnUdpPorts; BlackHoleIps = config.DefaultBlackHoleIps; MaintenanceTrackerEnabled = config.MaintenanceTrackerEnabled; MaintenanceCheckInterval = config.MaintenanceCheckInterval; }
public AuthCertificateUpdater(IScheduler scheduler, Common.Configuration.Config appConfig, IAuthCertificateManager authCertificateManager) { _appConfig = appConfig; _authCertificateManager = authCertificateManager; _timer = scheduler.Timer(); _timer.Tick += Timer_OnTick; }
public UpdateNotification( Common.Configuration.Config appConfig, IEventAggregator eventAggregator, UpdateFlashNotificationViewModel notificationViewModel) { _eventAggregator = eventAggregator; _notificationViewModel = notificationViewModel; _remindInterval = appConfig.UpdateRemindInterval; }
public Attachments(ILogger logger, Common.Configuration.Config appConfig, IEnumerable <Attachment> logFileSource, IEnumerable <Attachment> selectFileSource) { _logFileSource = logFileSource; _filteredItems = new TooLargeAttachmentFilter(appConfig.ReportBugMaxFileSize, new FileLengthAttachmentFilter(logger, new TooManyAttachmentFilter(Items, appConfig.ReportBugMaxFiles, new ExistingAttachmentFilter(Items, selectFileSource)))); }
public VpnCredentialProvider( Common.Configuration.Config config, IAppSettings appSettings, IUserStorage userStorage, IAuthCredentialManager authCredentialManager) { _config = config; _userStorage = userStorage; _appSettings = appSettings; _authCredentialManager = authCredentialManager; }
public AboutModalViewModel( Common.Configuration.Config appConfig, UpdateService appUpdater, IAppSettings appSettings, UpdateViewModel updateViewModel) { _appConfig = appConfig; _appUpdater = appUpdater; _appSettings = appSettings; Update = updateViewModel; }
protected BaseCountryServerProfileFormViewModel( Common.Configuration.Config appConfig, ColorProvider colorProvider, IUserStorage userStorage, ProfileManager profileManager, IDialogs dialogs, IModals modals, ServerManager serverManager) : base(appConfig, colorProvider, userStorage, profileManager, dialogs, modals, serverManager) { _modals = modals; }
public P2PDetector( ILogger logger, Common.Configuration.Config appConfig, IBlockedTraffic blockedTraffic, IForwardedTraffic forwardedTraffic, IScheduler scheduler, IModals modals, IDialogs dialogs) : this(logger, blockedTraffic, forwardedTraffic, scheduler.Timer(), modals, dialogs, appConfig.P2PCheckInterval.RandomizedWithDeviation(0.2)) { }
public AccountModalViewModel( Common.Configuration.Config appConfig, IActiveUrls urls, IUserStorage userStorage) { _appConfig = appConfig; _urls = urls; _userStorage = userStorage; ManageAccountCommand = new RelayCommand(ManageAccountAction); ProtonMailPricingCommand = new RelayCommand(ShowProtonMailPricing); }
public void TestInitialize() { _logger = Substitute.For <ILogger>(); _appConfig = new Common.Configuration.Config(); _logFileSource = Substitute.For <IEnumerable <Attachment> >(); _selectFileSource = Substitute.For <IEnumerable <Attachment> >(); _appConfig.ReportBugMaxFiles = 3; _appConfig.ReportBugMaxFileSize = 1000; _logFileSource.GetEnumerator().Returns(Enumerable.Empty <Attachment>().GetEnumerator()); _selectFileSource.GetEnumerator().Returns(Enumerable.Empty <Attachment>().GetEnumerator()); }
public AccountModalViewModel( Common.Configuration.Config appConfig, IActiveUrls urls, IUserStorage userStorage, PricingBuilder pricingBuilder) { _appConfig = appConfig; _urls = urls; _userStorage = userStorage; _pricingBuilder = pricingBuilder; ManageAccountCommand = new RelayCommand(ManageAccountAction); }
public GuestHoleConnector( IVpnServiceManager vpnServiceManager, IVpnConfig openVpnConfig, GuestHoleState guestHoleState, Common.Configuration.Config config, ICollectionStorage <GuestHoleServerContract> guestHoleServers) { _guestHoleServers = guestHoleServers; _config = config; _guestHoleState = guestHoleState; _vpnServiceManager = vpnServiceManager; _openVpnConfig = openVpnConfig; }
public ClientConfig( IAppSettings appSettings, IScheduler scheduler, IApiClient apiClient, Common.Configuration.Config config) { _appSettings = appSettings; _apiClient = apiClient; _timer = scheduler.Timer(); _timer.Interval = config.ClientConfigUpdateInterval.RandomizedWithDeviation(0.2); _timer.Tick += Timer_OnTick; _updateAction = new SingleAction(UpdateAction); }
public GuestHoleConnector( IVpnServiceManager vpnServiceManager, IAppSettings appSettings, GuestHoleState guestHoleState, Common.Configuration.Config config, ICollectionStorage <GuestHoleServerContract> guestHoleServers) { _guestHoleServers = guestHoleServers; _config = config; _guestHoleState = guestHoleState; _vpnServiceManager = vpnServiceManager; _appSettings = appSettings; }
public StreamingServicesUpdater( StreamingServicesStorage streamingServicesStorage, IApiClient apiClient, IScheduler scheduler, Common.Configuration.Config config) { _streamingServicesStorage = streamingServicesStorage; _apiClient = apiClient; _timer = scheduler.Timer(); _timer.Interval = config.StreamingServicesUpdateInterval.RandomizedWithDeviation(0.2); _timer.Tick += Timer_OnTick; _updateAction = new SingleAction(UpdateStreamingServices); }
public Firewall( ILogger logger, Common.Configuration.Config config, INetworkInterfaces networkInterfaces, IpLayer ipLayer, Sublayer sublayer) { _logger = logger; _config = config; _networkInterfaces = networkInterfaces; _ipLayer = ipLayer; _sublayer = sublayer; }
public AboutModalViewModel( Common.Configuration.Config appConfig, UpdateService appUpdater, IAppSettings appSettings, UpdateViewModel updateViewModel, IModals modals) { _modals = modals; _appConfig = appConfig; _appUpdater = appUpdater; _appSettings = appSettings; Update = updateViewModel; LicenseCommand = new RelayCommand(ShowLicense); }