コード例 #1
0
        public void AcceptFriend(int friendRequestId)
        {
            var friendRequestManager = new FriendRequestManager();
            var friendProfileManager = new FriendProfileManager();
            var friendRequest        = friendRequestManager.AcceptFriendRequest(friendRequestId);

            friendProfileManager.Add(new FriendRelationshiop()
            {
                UserProfileId       = friendRequest.UserProfileId,
                FriendUserProfileId = friendRequest.FriendUserProfileId
            });

            friendProfileManager.Add(new FriendRelationshiop()
            {
                UserProfileId       = friendRequest.FriendUserProfileId,
                FriendUserProfileId = friendRequest.UserProfileId,
            });
        }
コード例 #2
0
        public void AcceptFriend(long friendRequestId)
        {
            var friendRequestManager = new FriendRequestManager();
            var friendProfileManager = new FriendProfileManager();
            var friendRequest        = friendRequestManager.AcceptFriendRequest(friendRequestId);

            friendProfileManager.Add(new FriendProfile()
            {
                ProfileId       = friendRequest.ProfileId,
                FriendProfileId = friendRequest.FriendRequestProfileId,
                IsFavourite     = false
            });

            friendProfileManager.Add(new FriendProfile()
            {
                ProfileId       = friendRequest.FriendRequestProfileId,
                FriendProfileId = friendRequest.ProfileId,
                IsFavourite     = false
            });
        }