Ejemplo n.º 1
0
 private void OnNewSpeakerCreated(SpeakerCreatedEvent speakerCreatedEvent)
 {
     Id           = speakerCreatedEvent.Id;
     speakerBio   = new SpeakerBio(speakerCreatedEvent.Biography);
     phoneNumber  = new PhoneNumber(speakerCreatedEvent.PhoneNumber);
     emailAddress = new EmailAddress(speakerCreatedEvent.Email);
     speakerName  = new SpeakerName(speakerCreatedEvent.Name);
 }
Ejemplo n.º 2
0
        public void SetMemento(IMemento memento)
        {
            var speakerMemento = (SpeakerMemento)memento;

            Id           = speakerMemento.Id;
            Version      = speakerMemento.Version;
            speakerBio   = new SpeakerBio(speakerMemento.SpeakerBio);
            phoneNumber  = new PhoneNumber(speakerMemento.PhoneNumber);
            emailAddress = new EmailAddress(speakerMemento.SpeakerEmail);
            speakerName  = new SpeakerName(speakerMemento.SpeakerName);
        }
Ejemplo n.º 3
0
 public Speaker Create(SpeakerName speakerName, SpeakerBio speakerBio, PhoneNumber phoneNumber, EmailAddress emailAddress)
 {
     return(new Speaker(speakerName, speakerBio, phoneNumber, emailAddress));
 }
Ejemplo n.º 4
0
 public Speaker Create(SpeakerName speakerName, SpeakerBio speakerBio, PhoneNumber phoneNumber, EmailAddress emailAddress)
 {
     return new Speaker(speakerName, speakerBio, phoneNumber, emailAddress);
 }
Ejemplo n.º 5
0
 public Speaker(SpeakerName speakerName, SpeakerBio speakerBio, PhoneNumber phoneNumber, EmailAddress emailAddress)
     : this()
 {
     Apply(new SpeakerCreatedEvent(Guid.NewGuid(), speakerName.Name, speakerBio.Biography, phoneNumber.Number, emailAddress.Email));
 }