In Java you can do something like:
byte[] code = ReadFromClassFile("SomethingSomething.class");
SendAcrossNetwork(code);
And on the other end:
byte[] code = ReadFromNetwork();
Class marshalledCode = CustomClassLoader.defineClass(code, 0, code.length);
Object obj = marshalledCode.newInstance(); //Hey look, I've marshalled a class over the network!
The above leaves out 90% of the details, but you should get the idea.
My question is, what is the .NET equivalent?
I can find all sorts of references on Remoting, but nothing on this sort of class loading.
I've kind of stuck myself with byte[] as the lowest level transport level (Sockets, basically).
To be clear, the Type's involved start out on one machine and need to be marshaled to other machines that have nothing but a common Interface defined in a common Assembly. The Type being marshaled does not exist on the receiving machine.
Remote invocation is not acceptable in this case, I need objects to receive method calls only from the process that created them. Network traffic is very strictly controlled; I'm basically sending local behaviors across the network as needed, not distributing computing in anyway.