Skip to content

RPC Serialization

Alexander edited this page Aug 24, 2022 · 3 revisions

Neon is supporting serialization of primitives and protobuf messages.

Primitives:

  • Boolean
  • Single
  • Double
  • Byte
  • SByte
  • Int16
  • UInt16
  • Int32
  • UInt32
  • Int64
  • UInt64
  • Decimal
  • Char
  • String
  • Datetime

Protobuf messages

If you already have generated protobuf classes, you need to register them in your client/server configuration in any way below

configuration.Serializer.RegisterTypesFromAssembly(typeof(MyProtobufMessage).Assembly);
configuration.Serializer.RegisterTypesFromCurrentAssembly();
configuration.Serializer.RegisterType(typeof(MyProtobufMessage));

Be careful, types not registered in serializer will throw exception on serialization/deserializetion

Clone this wiki locally