예제 #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.Sender, friendship);
            AddAccountFriendRequest(@event.Receiver, friendship);
        }