public void PopulateFriends(IList <PlayerFriendsClientModel> friends) { Friends.AddRange(from f in friends select new FriendModel { PaladinsPlayerId = Convert.ToInt32(f.PlayerId), AccountId = Convert.ToInt32(f.AccountId), Name = f.Name }); }
async Task LoadToCollection(IEnumerable <Friend> friends) { await FriendsSemaphore.WaitAsync().ConfigureAwait(false); using (Friends.UpdatesBlock()) { Friends.Clear(); Friends.AddRange(friends); } FriendsSemaphore.Release(); }
protected override async Task OnInitializedAsync() { Game = await GameDataService.GetGameDetails(new Guid(GameId)); Friends.AddRange((await FriendDataService.GetAllFriends()).ToList()); }
public void AddFriends(IList <Player> newfriends) { Friends.AddRange(newfriends); }
public FriendList(IEnumerable <string> friends, IEnumerable <string> outRequests, IEnumerable <string> inRequests) { Friends.AddRange(friends); OpenFriendRequests.AddRange(outRequests); UnansweredFriendRequests.AddRange(inRequests); }