IFormatter assembly knowledge

J

Justin Crites

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top