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);
		}
		public virtual void CopyFrom(Address other)
		{
			Street = other.Street;
			City = other.City;
			ZipCode = other.ZipCode;
		}
Beispiel #3
0
		public Person(Address homeAddress, Address workAddress)
		: base(homeAddress, workAddress)
		{
		}
		private void OnDeserializing(StreamingContext context)
		{
			this.homeAddress = new Address();
		}
		public virtual void CopyFrom(Person other)
		{
			HomeAddress.CopyFrom(other.HomeAddress);
			WorkAddress = other.WorkAddress;
		}
		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;
		}
Beispiel #7
0
		public Address(Address other)
		: base(other)
		{
		}