Tuesday, May 24, 2011

Isolated Storage development in Windows Phone

Tonight I was racking my brain trying to get a json serialized file from the isolated storage of the emulator while I was debugging.  This tool is a god send and will help you to inspect the files that you create in the isolated storage of your development environment, it is named:  Windows Phone 7 Isolated Storage Explorer.  It can be found here:  http://wp7explorer.codeplex.com/.  There were a few quirky things, but it did exactly what I needed which was to let me inspect the files that I put into the isolated storage area.  I hope this post helps someone save some time.

For those that are interested...

I retrieved several DataServiceCollections from an odata feed, converted them to an ObservableCollection and then serialized it out to the Isolated Storage using the
DataContractJsonSerializer  and the IsolatedStorageFileStream.  This was all so that I could include this data with my application as a resource.  This was necessary since the odata service is not guaranteed to stay up much longer, and the data is not going to change.

But, with the help of the WP7Explorer, I was able to get the json serialized files and now I can include them with my application, and within the App.xaml I can put these files to the Isolated Storage the first time my application starts up.

Tim

No comments:

Post a Comment