Beispiel #1
0
        private async Task OnSearch()
        {
            var resultListTask = Task.Run(() =>
            {
                return(_originalCollection.Where(actor => actor.VoiceActor.Name.ToLowerInvariant().Contains(SearchQuery.ToLowerInvariant())).ToList());
            });

            var resultList = await resultListTask;

            FavoritedActors.ReplaceRange(resultList);
        }
Beispiel #2
0
        public async Task LoadAsync()
        {
            await Task.Run(() =>
            {
                if (_isUpdatingVoiceActors)
                {
                    return;
                }

                FavoritedActors.ReplaceRange(App.liteDB.GetCollection <FavoritedVoiceActor>().FindAll().ToList());
                _originalCollection = new List <FavoritedVoiceActor>(FavoritedActors);
            });
        }