Due to protobuf-net RuntimeTypeModel class, the complex datatype such as Dictionary are not getting converted to proto schema
The protobuf-net RuntimeTypeModel class has a function TryGetRepeatedProvider which checks if a C# data type is a proto’s “repeated” type and its c# System.Reflection.MemeberInfo type is present (e.g. string[] or List or Dictionary<T,K>) then do not create its proto schema.
Example:
c# Dictionary<string,string[]> is not getting converted to proto schema :
How to use Interface as [DataMember] in protobuf-net.Grpc.AspNetCore
I’m working on a .NET project where I need to use Protobuf and gRPC for serialization and communication. My classes use interfaces and the [DataContract] attribute. I’m having trouble getting everything set up correctly. Here are the relevant parts of my code: