private void AddAccountFriend(AccountID accountID, FriendshipEntry friendship) { if (!AccountFriends.TryGetValue(accountID, out var friendships)) { AccountFriends.Add(accountID, friendships = new Dictionary <FriendshipID, FriendshipEntry>()); } friendships.Add(friendship.ID, friendship); }
private void On(FriendshipRequested @event) { var friendship = new FriendshipEntry(@event.ID, @event.Sender, @event.Receiver); Dict.Add(@event.ID, friendship); Dict[@event.ID].Requested = true; AddAccountFriendRequest(@event.Receiver, friendship); }