Re: Progress maximum value on XML serialisation
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Jun 2007 11:37:36 -0400
Well, it would be kind of possible, but you would have to guess, at
best.
You can create a facade for the Stream that is being written to, passing
that to the XmlSerializer, which delegates calls to an underlying stream.
The facade would convey how many bytes were written to the underlying stream
through events, or some other mechanism.
However, it becomes moot, because you ultimately don't know the size of
the serialized instance until it is done. You could make a guess, but in
the end, that's all it is.
The best you can do is tell how many bytes were currently written.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<zacks@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1181834565.361981.71550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 14, 11:09 am, Manikandan <plmanikan...@xxxxxxxxx> wrote:
Hi,
I'm working with XML serialization.
I'm writing a xml file of huge size(above 500MB)
I need to show the user the progress of writing to file using progress
bar.
For this i need to create a thread and first start the thread and then
writing process, after writing to file stop the thread
My doubt is how to set the value for progress bar, some times file
size is 100MB and some other time 2GB like, I don't know how to set
the progress bar maximum value
Kindly help me to solve problem
Since the writing of an XML file with the XMLSerialization Serialize
method, I doubt if you could implement a progress bar showing the
progress of writing the file.
.
- Follow-Ups:
- Re: Progress maximum value on XML serialisation
- From: Manikandan
- Re: Progress maximum value on XML serialisation
- References:
- Progress maximum value on XML serialisation
- From: Manikandan
- Re: Progress maximum value on XML serialisation
- From: zacks
- Progress maximum value on XML serialisation
- Prev by Date: Re: Process synchronisation
- Next by Date: Re: Reference Vs Value array
- Previous by thread: Re: Progress maximum value on XML serialisation
- Next by thread: Re: Progress maximum value on XML serialisation
- Index(es):
Relevant Pages
|