Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. (De)serialization progress

(De)serialization progress

Scheduled Pinned Locked Moved C#
jsontutorialquestion
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stevo Z
    wrote on last edited by
    #1

    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

    G D 2 Replies Last reply
    0
    • S Stevo Z

      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

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        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

        S Offline
        S Offline
        Stevo Z
        wrote on last edited by
        #3

        How do you think your post was helpful to me?

        zilo

        G 1 Reply Last reply
        0
        • S Stevo Z

          How do you think your post was helpful to me?

          zilo

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          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

          S 1 Reply Last reply
          0
          • G Giorgi Dalakishvili

            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

            S Offline
            S Offline
            Stevo Z
            wrote on last edited by
            #5

            Thank you very much for help. Next time please don't bother me with such answers

            zilo

            G 1 Reply Last reply
            0
            • S Stevo Z

              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

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              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

              S 1 Reply Last reply
              0
              • D Dave Kreskowiak

                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

                S Offline
                S Offline
                Stevo Z
                wrote on last edited by
                #7

                Thanx 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

                1 Reply Last reply
                0
                • S Stevo Z

                  Thank you very much for help. Next time please don't bother me with such answers

                  zilo

                  G Offline
                  G Offline
                  Giorgi Dalakishvili
                  wrote on last edited by
                  #8

                  Ok, I won't. If you don't want to you will not get help from me.

                  Giorgi Dalakishvili #region signature my articles #endregion

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups