Exemplo n.º 1
0
 /// <summary>
 /// Accept an incoming invitation by adding it to "acceptedInvitations" and marking it as accepted
 /// from the perspective of this Person.
 /// </summary>
 /// <param name="invitation">Non-null incoming invitation to accept.</param>
 public void AcceptInvitation(Invitation invitation)
 {
     // Add the invitation to the accepted list
     acceptedInvitations.Add(invitation);
     // Modify the invitation acceptance state
     invitation.UpdateStatus(this, InvitationStatus.Accepted);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Deletes an incoming invitation, whether it is accepted or pending. Marks the invitation
 /// as rejected by this Person.
 /// </summary>
 /// <param name="invitation">The non-null incoming invitation to delete.</param>
 public void DeleteIncomingInvitation(Invitation invitation)
 {
     // Remove the invitation (from both list if it has been accepted, otherwise it is only removed
     // from the incoming invitations list)
     incomingInvitations.Remove(invitation);
     acceptedInvitations.Remove(invitation);
     // Change the acceptance state of the invitation to "rejected"
     invitation.UpdateStatus(this, InvitationStatus.Rejected);
 }