Discussion:
returned interface of a remote marshalbyRef object as paarmeter of another call possible?
(too old to reply)
cw
2008-07-15 15:09:38 UTC
Permalink
How is it possible to use a interface returned by a Remotimg call as
parameter of another remoting call?

Example:

interface I1 {

I2 GetI2();

Access(I2 i2);
}

If a client executes the remoting calls

I2 = i1.GetI2();
i1.Access(i2);

an exception is thrown because i2 is a reference to the proxy.

Any ideas? Thank you
Adam
2008-07-22 19:43:12 UTC
Permalink
Hi,

Cast it to the interface? This assumes you are deploying the interface to
your clients.

i2 = i1.GetI2();
i1.Access((Interface2)i2);

Cheers,

Adam
Post by cw
How is it possible to use a interface returned by a Remotimg call as
parameter of another remoting call?
interface I1 {
I2 GetI2();
Access(I2 i2);
}
If a client executes the remoting calls
I2 = i1.GetI2();
i1.Access(i2);
an exception is thrown because i2 is a reference to the proxy.
Any ideas? Thank you
Loading...