Пример #1
0
 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);
 }
Пример #2
0
        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);
        }