471,347 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,347 software developers and data experts.

IFormatter assembly knowledge

How does an IFormatter (the serialization interface) know what
assemblies are available to it?

Let's say you dynamically load Assembly A (by this I mean there is no
compile-time dependency), instantiate a type T, then use
BinaryFormatter to serialize it. What happens when we attempt to
deserialize this type later?

What is the proper way to inform IFormatter of some business logic by
which our application knows of some number of classes (say, a registry
of sorts)? Perhaps we have an application which can load "plugins";
the assemblies for which are obviously not known at the time the
application is compiled. How do we perform serialization on these
objects such that we can inform an IFormatter where the assemblies
might be? (At the time of deserialization, perhaps we do not even know
yet where the assembly is)

I'm sorry if this message is unclear. It's a difficult problem for me
to describe. The essence of it is that IFormatter type instantiation
seems like a black box to me and I'm wondering how to control it.

Jan 21 '06 #1
1 1633
Upon more research, I answered my own question. This process is
controlled by a SerializationBinder.

Documentation on that type is here:
http://msdn.microsoft.com/library/de...classtopic.asp

Jan 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Tony Jones | last post: by
1 post views Thread by Eric Workman | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.