Use of the Business Mapper to serialize
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Use of the Business Mapper to serializeExpand / Collapse
Author
Message
Posted 12/01/2005 7:29:20 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 03/25/2006 6:08:39 PM
Posts: 36, Visits: 65
After reading your documentaion "Common Serialized Field Mistakes" my interpretation of this is that once you set a field to be serialized every time you access the field deserializes before you get the strong-type.

Doing this you have to make a local copy and use that. Please explain?

Tks

Post #204
Posted 12/01/2005 8:37:18 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
Yes, every time you access a "serialized" property, the serialized data within the business object's CurrentDataTable is de-serialized and returned. If you type something like this:

MyBO.SerializedBitmap.Width = 50


the business object de-serializes the bitmap, and you set the width on the object that was just de-serialized. However, this line of code 1) does not obtain an object reference to the object that was just de-serialized and 2) does not re-assign the value of the modified bitmap object back to the serialized property (so, the modified bitmap is never re-serialized back into the data table). When working with a serialized field, you need to save an object reference to the object that was pulled out and put it back in to the property when you're done with it.



www.bungie.net
Post #208
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 2:35am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.