示例#1
0
 /// <summary>
 /// Removes the client.
 /// </summary>
 /// <param name="joinedClient">The joined client.</param>
 public void RemoveClient(Client joinedClient)
 {
     if (this.clientList.Contains(joinedClient))
     {
         this.clientList.Remove(joinedClient);
     }
     else
     {
         throw new PopayeShopException("Wrong data entered...This client doesnt exist");
     }
 }
示例#2
0
        /// <summary>
        /// Adds the client.
        /// </summary>
        /// <param name="joinedClient">The joined client.</param>
        public void AddClient(Client joinedClient)
        {
            if (this.clientList.Contains(joinedClient))
            {
                throw new PopayeShopException("We cannot add the same person twice");
            }

            this.clientList.Add(joinedClient);
        }