Example #1
0
        public async Task <IReadOnlyList <Profile> > GetProfiles()
        {
            var profiles = await _profiles.GetAll();

            foreach (var profile in profiles)
            {
                profile.Server      = _serverManager.GetServer(new ServerById(profile.ServerId));
                profile.CountryCode = profile.CountryCode?.ToUpper() ?? profile.Server?.ExitCountry;
            }

            return(profiles);
        }
Example #2
0
        private async Task MergeApiToExternal()
        {
            IReadOnlyList <Profile> profiles;

            try
            {
                profiles = await _apiProfiles.GetAll();

                _cancellationToken.ThrowIfCancellationRequested();
            }
            catch (ProfileException e)
            {
                _syncFailed       = true;
                _syncErrorMessage = e.Message;
                return;
            }

            await MergeApiToExternal(profiles);
        }
 public Task <IReadOnlyList <Profile> > GetAll()
 {
     return(_storage.GetAll());
 }
Example #4
0
 public Task <IReadOnlyList <Profile> > GetAll()
 {
     return(_profiles.GetAll());
 }