TransparentProxy and Reflection
- From: "RRLear@xxxxxxxxx" <RRLear@xxxxxxxxx>
- Date: 25 Feb 2006 09:15:33 -0800
I'm using reflection to instantiate classes and then to invoke methods
on the instances. Things have been going pretty smoothly actually
until I tried to pass in a MarshallByReference object. When I try to
invoke a method from the interface that the object implements, I get an
exception complaining that the method isn't found. And sure enough,
the actual type of the object presented to me is a TransparentProxy.
No surprise there if I'd thought about it.
So my question is, How do I use reflection to invoke a method on an
MBR/TransparentProxy object? I can't do any kind of cast since I don't
know the type at compile time, only at runtime. I thought maybe the
Convert package would give some help, but the object needs to implement
IConvertable.
If I look at the System.Runtime.Remoting.ObjRef and the
IRemotingTypeInfo in the debugger, the information is there, but in
private/protected fields. At this point, I'm stuck.
Any thoughts?
Thanks,
Russell.
.
- Prev by Date: Audio Streaming .NET 2.0
- Next by Date: Re: test for .net 2.0
- Previous by thread: Audio Streaming .NET 2.0
- Next by thread: Why can't I get simple multipliation answer
- Index(es):
Relevant Pages
|