Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
        public void WithdrawInvitation(string invitationIdentifier)
        {
            RegistrationInvitation invitation = this.GetInvitation(invitationIdentifier);

            if (invitation != null)
            {
                this.registrationInvitations.Remove(invitation);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }