public DynamicResourcesConverter()
		{
			if (DesignMode.DesignModeEnabled)
				return;

			_appSettings = ServiceLocator.Current.GetInstance<AppSettingsService>();
		}
		public SubscriptionsManager(ApiClient apiClient, TelemetryClient telemetryClient, AppSettingsService settingsService)
		{
			if (apiClient == null) throw new ArgumentNullException("apiClient");
			if (telemetryClient == null) throw new ArgumentNullException("telemetryClient");
			if (settingsService == null) throw new ArgumentNullException("settingsService");

			_apiClient = apiClient;
			_telemetryClient = telemetryClient;
			_settingsService = settingsService;
		}
Example #3
0
        public SubscriptionsManager(ApiClient apiClient, TelemetryClient telemetryClient, AppSettingsService settingsService)
        {
            if (apiClient == null)
            {
                throw new ArgumentNullException("apiClient");
            }
            if (telemetryClient == null)
            {
                throw new ArgumentNullException("telemetryClient");
            }
            if (settingsService == null)
            {
                throw new ArgumentNullException("settingsService");
            }

            _apiClient       = apiClient;
            _telemetryClient = telemetryClient;
            _settingsService = settingsService;
        }
Example #4
0
        public RichTextBlockBuilder()
        {
            if (DesignMode.DesignModeEnabled)
            {
                return;
            }

            _appSettings = ServiceLocator.Current.GetInstance <AppSettingsService>();
            _telemetry   = ServiceLocator.Current.GetInstance <TelemetryClient>();

            var displayInformation = DisplayInformation.GetForCurrentView();

            _maxImageWidth = ImageManager.GetMaxImageWidth(displayInformation);
            _httpClient    = new HttpClient(new HttpClientHandler()
            {
                AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate, AllowAutoRedirect = true
            });
            _dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
        }
		public SubscriptionsPageViewModel([NotNull] INavigationService navigationService,
			[NotNull] ApiClient apiClient,
			[NotNull] AppSettingsService settingsService,
			[NotNull] TelemetryClient telemetryClient,
			[NotNull] TileManager tileManager,
			[NotNull] LocalStorageManager localStorageManager,
			[NotNull] SubscriptionsManager subscriptionsManager,
			[NotNull] NetworkManager networkManager)
		{
			if (navigationService == null) throw new ArgumentNullException("navigationService");
			if (apiClient == null) throw new ArgumentNullException("apiClient");
			if (settingsService == null) throw new ArgumentNullException("settingsService");
			if (telemetryClient == null) throw new ArgumentNullException("telemetryClient");
			if (tileManager == null) throw new ArgumentNullException("tileManager");
			if (localStorageManager == null) throw new ArgumentNullException("localStorageManager");
			if (subscriptionsManager == null) throw new ArgumentNullException("subscriptionsManager");
			if (networkManager == null) throw new ArgumentNullException("networkManager");

			_navigationService = navigationService;
			_apiClient = apiClient;
			_settingsService = settingsService;
			_telemetryClient = telemetryClient;
			_tileManager = tileManager;
			_localStorageManager = localStorageManager;
			_subscriptionsManager = subscriptionsManager;
			_networkManager = networkManager;

			_dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;

			Application.Current.Resuming += Application_Resuming;
			_networkManager.NetworkChanged += _networkManager_NetworkChanged;
		}
        public SettingsPageViewModel([NotNull] AppSettingsService settingsService,
			[NotNull] TelemetryClient telemetryClient,
			[NotNull] LocalStorageManager localStorageManager)
        {
            if (settingsService == null) throw new ArgumentNullException("settingsService");
            if (telemetryClient == null) throw new ArgumentNullException("telemetryClient");
            if (localStorageManager == null) throw new ArgumentNullException("localStorageManager");

            _settingsService = settingsService;
            _telemetryClient = telemetryClient;
            _localStorageManager = localStorageManager;

            _initialDisplayCulture = _settingsService.DisplayCulture;
        }