예제 #1
0
        private async void UpdateStock()
        {
            Users = await _dataLoader.GetUsers();

            Items = await _dataLoader.GetItems();

            StockData = await _dataLoader.GetStockData();

            foreach (var user in Users)
            {
                LoadUserImage(user);
            }

            foreach (var stockItem in StockData)
            {
                stockItem.Item = Items.Single(s => s.Id == stockItem.ItemId);
                stockItem.User = Users.Single(s => s.Id == stockItem.TraderId);
            }

            OnDataUpdated?.Invoke();
        }