Ejemplo n.º 1
0
		/// <summary>
		/// Initializes a new instance of the <see cref="Person"/> class.
		/// </summary>
		/// <param name="tenantId">
		/// Initial value of the <see cref="TenantId"/> property.
		/// </param>
		/// <param name="name">
		/// Initial value of the <see cref="Name"/> property.
		/// </param>
		/// <param name="contactInformation">
		/// Initial value of the <see cref="ContactInformation"/> property.
		/// </param>
		public Person(TenantId tenantId, FullName name, ContactInformation contactInformation)
		{
			// Defer validation to the property setters.
			this.ContactInformation = contactInformation;
			this.Name = name;
			this.TenantId = tenantId;
		}
 public ContactInformation(ContactInformation contactInformation)
     : this(contactInformation.EmailAddress,
            contactInformation.PostalAddress,
            contactInformation.PrimaryTelephone,
            contactInformation.SecondaryTelephone)
 {
 }
 public PersonContactInformationChanged(
         TenantId tenantId,
         String username,
         ContactInformation contactInformation)
 {
     this.ContactInformation = contactInformation;
     this.EventVersion = 1;
     this.OccurredOn = DateTime.Now;
     this.TenantId = tenantId.Id;
     this.Username = username;
 }
Ejemplo n.º 4
0
        public void ChangeContactInformation(ContactInformation contactInformation)
        {
            this.ContactInformation = contactInformation;

            DomainEventPublisher
            .Instance
            .Publish(new PersonContactInformationChanged(
                         this.TenantId,
                         this.User.Username,
                         this.ContactInformation));
        }
Ejemplo n.º 5
0
        public void ChangeContactInformation(ContactInformation contactInformation)
        {
            this.ContactInformation = contactInformation;

            DomainEventPublisher
                .Instance
                .Publish(new PersonContactInformationChanged(
                        this.TenantId,
                        this.User.Username,
                        this.ContactInformation));
        }
Ejemplo n.º 6
0
 public PersonContactInformationChanged(
     TenantId tenantId,
     String username,
     ContactInformation contactInformation)
 {
     this.ContactInformation = contactInformation;
     this.EventVersion       = 1;
     this.OccurredOn         = DateTime.Now;
     this.TenantId           = tenantId.Id;
     this.Username           = username;
 }
Ejemplo n.º 7
0
 public PersonContactInformationChanged(
     TenantId tenantId,
     String username,
     ContactInformation contactInformation)
 {
     ContactInformation = contactInformation;
     EventVersion       = 1;
     OccurredOn         = DateTime.Now;
     TenantId           = tenantId.Id;
     Username           = username;
 }
Ejemplo n.º 8
0
        public void ChangeContactInformation(ContactInformation newContactInformation)
        {
            // Defer validation to the property setter.
            this.ContactInformation = newContactInformation;

            DomainEventPublisher
            .Instance
            .Publish(new PersonContactInformationChanged(
                         this.TenantId,
                         this.User.Username,
                         this.ContactInformation));
        }
Ejemplo n.º 9
0
 public void ChangePersonalContactInformation(ContactInformation contactInformation)
 {
     this.Person.ChangeContactInformation(contactInformation);
 }
Ejemplo n.º 10
0
 public void ChangePersonalContactInformation(ContactInformation contactInformation)
 {
     this.Person.ChangeContactInformation(contactInformation);
 }
Ejemplo n.º 11
0
 public Person(TenantId tenantId, FullName name, ContactInformation contactInformation)
 {
     this.ContactInformation = contactInformation;
     this.Name = name;
     this.TenantId = tenantId;
 }
Ejemplo n.º 12
0
 public Person(TenantId tenantId, FullName name, ContactInformation contactInformation)
 {
     this.ContactInformation = contactInformation;
     this.Name     = name;
     this.TenantId = tenantId;
 }
Ejemplo n.º 13
0
		public void ChangeContactInformation(ContactInformation newContactInformation)
		{
			// Defer validation to the property setter.
			this.ContactInformation = newContactInformation;

			DomainEventPublisher
				.Instance
				.Publish(new PersonContactInformationChanged(
						this.TenantId,
						this.User.Username,
						this.ContactInformation));
		}