Hi josh,
We don't need to argue the point as to whether or not this is necessary or a
good idea. I'll just take you at your word that you want this, regardless.
After a good bit of research, both into Binary Serialization and into XML
Serialization, I can only offer guesses as to why the BinaryFormatter raises
this event, but the XmlSerializer does not. Binary Serialization is often
used with Remoting, and is used when performance and latency are more of an
issue than when using XML Serialization. After all, XML Serialization is
generally used locally, or via Web Services. With Web Services, latency is
expected. Again, I'm just guessing here. With Binary Serialization, it is
possible to serialize every member of a class, both data and process, but at
a cost. So, from the examples I've seen, the IDeserializationCallback was
used to allow the deserialized class to reconstruct members that were not
serialized, with the justification being that performance was gained in not
serializing these members.
Now, I suppose it is conceivable that one might want to do something like
this with XML Serialization. For whatever reasons, it just doesn't exist in
the System.Xml.Serialization NameSpace. What you can do is to implement your
own class(es) that do this, if you like. Otherwise, you may as well stick
with what you're presently working with.
Sorry I couldn't be more help.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.