예제 #1
0
        public bool InviteFriend(int userId, string friendName)
        {
            bool result = FriendDAO.Invite(userId, friendName);

            if (result)
            {
                foreach (var client in _connectedClients)
                {
                    if (client.Key.ToLower() == friendName.ToLower())
                    {
                        client.Value.connection.GetInvites();
                    }
                }
            }
            return(result);
        }
예제 #2
0
 public bool IsFriendOrInvited(int userId, int friendId)
 {
     return(FriendDAO.IsFriendOrInvited(userId, friendId));
 }
예제 #3
0
 public string FindById(int id)
 {
     return(FriendDAO.FindById(id));
 }
예제 #4
0
 public List <string> FindByName(string name)
 {
     return(FriendDAO.Find(name));
 }
예제 #5
0
 public List <string> GetInvited(int userId)
 {
     return(FriendDAO.GetInvited(userId));
 }
예제 #6
0
 public List <string> GetContacts(int userId)
 {
     return(FriendDAO.GetContacts(userId));
 }
예제 #7
0
 public void Reject(int id)
 {
     FriendDAO.Reject(id);
 }
예제 #8
0
 public void Accept(int id)
 {
     FriendDAO.Accept(id);
 }