Re: Accessor Issue

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Steven,

You would have to have each property on the Address class call the
MarkDirty method in order to specify that the property has changed.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Steven Wolf" <apoc69@xxxxxxx> wrote in message
news:652d8807.0504120749.5db3246d@xxxxxxxxxxxxxxxxxxxxx
> Hi guys,
>
> maybe you can help me again in developing my bussiness project for a
> company..
>
>
> i make sure, that each property of an entity, mark it self dirty when
> data get changed.. thats the code:
> private Address address;
>
> ....
>
> /// <summary>
> /// Set or return an address object
> /// </summary>
>
> class Facility : EntityObject
> {
>
> [EntityMemberAttribute]
> public Address Address
> {
> get { return this.address; }
> set { base.MarkDirty(); this.address = value; }
> }
>
>
> In this case, the address object i return here, has his own members,
> like: Street, Zip, City..
>
> So, i can access them easily by: someFacility.Address.City;
>
>
> the problem comes, when i try to change the city, for example:
>
> someFacility.Address.City = "New York";
>
>
> the facility class does'nt get dirty, because the someFacility.Address
> property use the get accessor in order to return the address, and the
> address itself use finaly the set-accessor..
>
>
> is there any possibility to fix that problem, instead creating a new
> address object and put that on the facility? (someFacility.Address =
> new Address(... )
>
>
> steven.


.



Relevant Pages

  • Accessor Issue
    ... i make sure, that each property of an entity, mark it self dirty when ... class Facility: EntityObject ... like: Street, Zip, City.. ...
    (microsoft.public.dotnet.languages.csharp)
  • Accessor Issue
    ... i make sure, that each property of an entity, mark it self dirty when ... class Facility: EntityObject ... like: Street, Zip, City.. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Rural Medical Care Available
    ... There's not a doctor in the city. ... care facility, emergencies go by ambulance or helicoptor (esp. ...
    (misc.rural)
  • Re: Houston, we have a problem...
    ... The City has Kathy's numbers. ... Gambling on track cycling isn't legal in any state in the USA. Ignore ... the track is a closed facility. ... cover all the normal annual expenditures as well as pay our coach to ...
    (rec.bicycles.racing)
  • Re: Writing to position x, y in a text file
    ... regular export facility to create it. ... Step through the export wizard, ... For instance, I have columns name, address, and city. ... at an exact with the exact spacing without calculating it every time? ...
    (microsoft.public.access.modulesdaovba)