示例#1
0
        public MethodResult CanSendFriendRequest(Citizen proposer, Citizen other)
        {
            if (friendRepository.AreFriends(proposer, other))
            {
                return(new MethodResult("You are already friends!"));
            }

            if (friendRepository.AnyFriendRequestBetween(proposer, other))
            {
                return(new MethodResult("There is already friend request between you!"));
            }

            return(MethodResult.Success);
        }