コード例 #1
0
        async public Task GetAllAthletes(bool forceRefresh = false)
        {
            if (_hasLoadedBefore && !forceRefresh)
            {
                return;
            }

            AllAthletes.Clear();

            var task = AzureService.Instance.GetAllAthletes();

            await RunSafe(task);

            if (task.IsFaulted)
            {
                return;
            }

            _hasLoadedBefore = true;
            LocalRefresh();
        }
コード例 #2
0
 public void LocalRefresh()
 {
     AllAthletes.Clear();
     DataManager.Instance.Athletes.Values.OrderBy(a => a.Name).ToList().ForEach(AllAthletes.Add);
 }