Print Page | Close Window

Property Interceptors

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2127
Printed Date: 22-Apr-2025 at 4:21am


Topic: Property Interceptors
Posted By: eniben
Subject: Property Interceptors
Date Posted: 04-Sep-2010 at 1:48am
Hi,

When do Property Interceptors fire?  When an Entity is live (added to the EntityManager) and a property is accessed or mutated, they fire - agreed.

But do they also fire when the object is detached?  I noticed this when creating an object and having its primary key set before adding it to the EntityManager.

Do they fire during serialization?  DevForce now seems to use property level serialization as opposed to the "deep copying" of the past.  That means when an object is deserialized either on the BOS or the client the property accessors are called.  Will the object know it's being deserialized and the EntityProperties respect this and know not to call declared PropertyInterceptors?

I ask this because I am getting some curious behaviour from a troublesome object in my Domain.  I haven't quite noticed it with others so maybe I am fishing.  But I can't seem to nail it to anything.






Replies:
Posted By: sbelini
Date Posted: 10-Sep-2010 at 6:55pm
Hi,
 
Property Interceptors do fire when the entity is detached(that's standard behavior).
 
However, they do not fire during serialization (in fact, they should not).
 
 


Posted By: eniben
Date Posted: 11-Sep-2010 at 10:11pm
Ok, thanks.  Just needed to check.



Print Page | Close Window