コード例 #1
0
        internal void DeclineInvitation(int invitationId)
        {
            var currentInvitation =
                Ensure.Any.IsNotNull(Invitations.Find(current => current.Id == invitationId));

            if (currentInvitation.Status != InvitationStatus.InProgress)
            {
                throw new InvitationAlreadyChangedException(invitationId);
            }
            currentInvitation.Status = InvitationStatus.Declined;
        }
コード例 #2
0
 internal Invitation GetInvitation(int invitationId)
 {
     return(Ensure.Any.IsNotNull(Invitations.Find(current => current.Id == invitationId)));
 }