示例#1
0
        private void onFetchSucceeded()
        {
            var ratingViewConfiguration        = fetchRemoteConfigService.ExtractRatingViewConfigurationFromRemoteConfig();
            var pushNotificationsConfiguration = fetchRemoteConfigService.ExtractPushNotificationsConfigurationFromRemoteConfig();

            keyValueStorage.SetInt(RatingViewDelayParameter, ratingViewConfiguration.DayCount);
            keyValueStorage.SetString(RatingViewTriggerParameter, ratingViewConfiguration.Criterion.ToString());
            keyValueStorage.SetBool(RegisterPushNotificationsTokenWithServerParameter, pushNotificationsConfiguration.RegisterPushNotificationsTokenWithServer);
            keyValueStorage.SetBool(HandlePushNotificationsParameter, pushNotificationsConfiguration.HandlePushNotifications);

            lock (updateLock)
            {
                keyValueStorage.SetDateTimeOffset(LastFetchAtKey, timeService.CurrentDateTime);
                remoteConfigUpdatedSubject.OnNext(Unit.Default);
                isRunning = false;
            }
        }
 public void SaveApiToken(string apiToken)
 {
     keyValueStorage.SetString(apiTokenKey, apiToken);
 }
示例#3
0
 public void SetClientOutdated()
 {
     keyValueStorage.SetString(outdatedClientKey, version.ToString());
 }
 public void StoreRegisteredToken(PushNotificationsToken token, DateTimeOffset now)
 {
     keyValueStorage.SetString(previouslyRegisteredTokenKey, token.ToString());
     keyValueStorage.SetDateTimeOffset(dateOfRegisteringPreviousTokenKey, now);
 }