[Mono-list] Events using Remoting

Lluis Sanchez lluis@ximian.com
Fri, 03 Dec 2004 01:52:40 +0100

On dj, 2004-12-02 at 18:33 -0500, Jonathan Gilbert wrote:
> At 11:46 AM 02/12/2004 +0100, Lluis Sanchez wrote:
> >Hi,
> >
> >The problem is that the delegate is referencing a method of a type that
> >is no available in the server. When the server tries to deserialize the
> >delegate, it can't find the referenced type and throws the exception.
> The server *can* see the delegate type itself, though, right?


>  I thought
> delegates were MarshalByRef and as such a remoted delegate would be a proxy

No, delegates are marshalled by value.

> which, when Invoke()d, would call back across the remoting channel... I

it will, if the referenced object is MarshalByRef.

> seem to remember testing this in .NET in the distant past (and it working)...

It will only work if the type of the referenced object is available in
the server. If not, remoting fails when trying to determine which method
has to be called.

> Jonathan Gilbert
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list