Exemple #1
0
        public bool IsRegistrationAvailableThrough(string invitationIdentifier)
        {
            AssertionConcern.AssertStateTrue(this.Active, "Tenant is not active.");

            RegistrationInvitation invitation = this.GetInvitation(invitationIdentifier);

            return((invitation != null) && invitation.IsAvailable());
        }
Exemple #2
0
        public void WithdrawInvitation(string invitationIdentifier)
        {
            RegistrationInvitation invitation = this.GetInvitation(invitationIdentifier);

            if (invitation != null)
            {
                this.registrationInvitations.Remove(invitation);
            }
        }
Exemple #3
0
        public RegistrationInvitation OfferRegistrationInvitation(string description)
        {
            AssertionConcern.AssertStateTrue(this.Active, "Tenant is not active.");
            AssertionConcern.AssertArgumentFalse(this.IsRegistrationAvailableThrough(description), "Invitation already exists.");

            RegistrationInvitation invitation = new RegistrationInvitation(this.Id, Guid.NewGuid().ToString(), description);

            AssertionConcern.AssertStateTrue(this.registrationInvitations.Add(invitation), "The invitation should have been added.");

            return(invitation);
        }
Exemple #4
0
        public RegistrationInvitation RedefineRegistrationInvitationAs(string invitationIdentifier)
        {
            AssertionConcern.AssertStateTrue(this.Active, "Tenant is not active.");

            RegistrationInvitation invitation = this.GetInvitation(invitationIdentifier);

            if (invitation != null)
            {
                invitation.RedefineAs().OpenEnded();
            }

            return(invitation);
        }