all groups > dotnet remoting > february 2008 >
You're in the

dotnet remoting

group:

Remoting with Generics?


Remoting with Generics? Frank Osterberg
2/25/2008 1:14:31 PM
dotnet remoting:
i want to use Remoting for IPC (inter process communication).

I thought that the most flexible Exchange (remoted) object would be a
singleton implementing the Dictionary(K,T) interface (K & T being exposed
generic key and data types).

This way I could for example use the same standard exchange class to
exchange data of various types and with various key types. If i try it
howver i always get a 'transparent proxy cannot be converted into ....'
error. I googled a bit and found an example (
http://msdn2.microsoft.com/en-us/library/ms180986.aspx )supposedly
implementing remoting with generics, but it uses external config file with
hardcoded host names and doesn't actually seems to call anything 'remotely'
(just methods on a locally declared instance?!), unless i am not reading the
code right of course.

I could of course just make the key and data type 'Object' and use a non
generic hashtable, but this makes it harder to use so I was wondering if it
is possible to use a generic class with a dictionary interface that way.

Thanks for any related info. or suggestion!

Regards,

Frank

Re: Remoting with Generics? Frank Osterberg
2/25/2008 2:21:53 PM
Never mind, i got it to work, it was a logic error.
Thanks!

"Frank Osterberg" <raven7370@yahoo.com> schrieb im Newsbeitrag
news:OVV%236f6dIHA.1824@TK2MSFTNGP02.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button