コード例 #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);
        }