(X) Hide this Join our next live webcast on December 15th, 10 am PDT - Building a Silverlight 4 application end-to-end. Presenter: Gill Cleeren
Check the webinar agenda | Register for the webinar
Skip Navigation LinksHome / News / View News

Attribute-based transient Tombstoning

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Dec 01, 2010
(0 votes)

SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on TwitterPeter Kuhn demonstrates an attribute-driven approach to mark members of types for persistence in the transient application state of WP7, similar to using the data member attribute when the data contract serializer is used.

Source: Mister Goodcat

Hopefully every Windows Phone 7 developer has heard about Tombstoning by now. To avoid writing the same code to persist and retrieve data again and again, there have been quite some efforts in the past to create generic methods of handling this process of application deactivation/termination by various people. James Ashley for example uses the ApplicationSettings and State classes for this (improved by rschiefer here). I personally like implementations that use the data contract serializer (here is an example by Joost van Schaik), because I can selectively choose what values should be serialized by applying the data member attribute only to those properties I want to be persisted.  

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 2 and 8 and type the answer here: