(De)serialization progress
-
Hi, has anyone ever needed to report progress when (de)serializing objects? I have implemented loading/saving project files (for my application) via serialization and this could take up to 5-10 sec, depending on what's in the project. So I'd like to do it asychronously and report progress. Is there any way how to find out (de)serialization progress(perc completed)? thanx
zilo
-
Hi, has anyone ever needed to report progress when (de)serializing objects? I have implemented loading/saving project files (for my application) via serialization and this could take up to 5-10 sec, depending on what's in the project. So I'd like to do it asychronously and report progress. Is there any way how to find out (de)serialization progress(perc completed)? thanx
zilo
I remember reading an article about it but I can't remember where I found it. I am more than sure Google has the answer[^]
Giorgi Dalakishvili #region signature my articles #endregion
-
I remember reading an article about it but I can't remember where I found it. I am more than sure Google has the answer[^]
Giorgi Dalakishvili #region signature my articles #endregion
-
If my post was not helpful, you can ignore it. However, If my post was not helpful, I am afraid that none of the post will be helpful for you. Good luck ;)
Giorgi Dalakishvili #region signature my articles #endregion
-
If my post was not helpful, you can ignore it. However, If my post was not helpful, I am afraid that none of the post will be helpful for you. Good luck ;)
Giorgi Dalakishvili #region signature my articles #endregion
-
Hi, has anyone ever needed to report progress when (de)serializing objects? I have implemented loading/saving project files (for my application) via serialization and this could take up to 5-10 sec, depending on what's in the project. So I'd like to do it asychronously and report progress. Is there any way how to find out (de)serialization progress(perc completed)? thanx
zilo
That depends on how you're serializing objects. If you're just calling a single method that walks an object graph, then you're not going to get anny progress information back from that method. If you're writing the code to walk the object graph, serializing each node yourself, then you can put some extra code in there to report some kind of progress. But, if you have no way of knowing when the end of the graph is, you really can't report any percentage of progress completed. So, you're only other option would be to use a non-progressing progress bar. It'll just show something is still happening, but not report real progress.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
That depends on how you're serializing objects. If you're just calling a single method that walks an object graph, then you're not going to get anny progress information back from that method. If you're writing the code to walk the object graph, serializing each node yourself, then you can put some extra code in there to report some kind of progress. But, if you have no way of knowing when the end of the graph is, you really can't report any percentage of progress completed. So, you're only other option would be to use a non-progressing progress bar. It'll just show something is still happening, but not report real progress.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Thanx for answer. that's what I was afraid of... I was hoping there might be at least something saying on what position of the Stream is the serializer currently, that would be more than enough for my needs... btw I'm using BinaryFormatter.Deserialize (Serialize) and I'm implementing the ISerializable interface (GetObjectData and Constructor) for classes to serialize. I'll just say that something is happening...
zilo
-
Ok, I won't. If you don't want to you will not get help from me.
Giorgi Dalakishvili #region signature my articles #endregion