I am trying to call an RPC function bar() that returns a value of type Foo. Foo is an identical class on both the server and client.
The dynamic proxy always returns a MessagePackObject, and it's possible to dynamically cast this to a basic type (i.e. ulong). But a compile-time error results if I try to cast it to Foo.
I understand that a serializer for Foo can be created and registered in the SerializationContext, but this doesn't change the fact that I can't perform a cast upon the MessagePackObject returned by the call.
Is it possible to convert the return value to Foo? If it is, could someone please provide a simple example?
I am trying to call an RPC function bar() that returns a value of type
Foo.Foois an identical class on both the server and client.The dynamic proxy always returns a
MessagePackObject, and it's possible to dynamically cast this to a basic type (i.e.ulong). But a compile-time error results if I try to cast it toFoo.I understand that a serializer for
Foocan be created and registered in theSerializationContext, but this doesn't change the fact that I can't perform a cast upon theMessagePackObjectreturned by the call.Is it possible to convert the return value to
Foo? If it is, could someone please provide a simple example?