Exemplo n.º 1
0
		protected BasePerson(Address homeAddress, Address workAddress)
		{
			if (homeAddress == null)
				throw new ArgumentNullException("homeAddress");
			this.homeAddress = homeAddress;
			AddHomeAddressListeners(this.homeAddress);
			this.workAddress = workAddress;
			AddWorkAddressListeners(this.workAddress);
		}
Exemplo n.º 2
0
		public virtual void CopyFrom(Address other)
		{
			Street = other.Street;
			City = other.City;
			ZipCode = other.ZipCode;
		}
Exemplo n.º 3
0
		public Person(Address homeAddress, Address workAddress)
		: base(homeAddress, workAddress)
		{
		}
Exemplo n.º 4
0
		private void OnDeserializing(StreamingContext context)
		{
			this.homeAddress = new Address();
		}
Exemplo n.º 5
0
		public virtual void CopyFrom(Person other)
		{
			HomeAddress.CopyFrom(other.HomeAddress);
			WorkAddress = other.WorkAddress;
		}
Exemplo n.º 6
0
		protected virtual bool SetWorkAddress(Address workAddress)
		{
			if (this.workAddress == workAddress)
				return false;
				
			NotifyPropertyChanging(PROPERTIES.WORK_ADDRESS);
			
			RemoveWorkAddressListeners(this.workAddress);
			
			this.workAddress = workAddress;
			
			AddWorkAddressListeners(this.workAddress);
			
			NotifyPropertyChanged(PROPERTIES.WORK_ADDRESS);
			
			return true;
		}
Exemplo n.º 7
0
		public Address(Address other)
		: base(other)
		{
		}