AkroMentos
AkroMentos
Explore posts from servers
CC#
Created by AkroMentos on 10/6/2023 in #help
❔ Mapping common primitive types with protobuf & grpc
I have a bunch of generated classes from proto that contain semi-pritmitive data types, for example Vector3. In every project I have to define (copy-paste) mapping code from the generated proto Vector3 to the proto Vector3. Are there any best practices doing this kind of stuff? I found auto mapping libraries but those still require me to define a mapping and I'd be repeating the mapping definitions in every project where I use the generated files.
70 replies
CC#
Created by AkroMentos on 9/7/2023 in #help
❔ Testing services that are using Grpc clients generated via Grpc.Tools
It's so weird that I don't get an interface instead in all services I have to rely on the autogenerated class. It's technically fine because everything is generated as a virtual function in the Client as well so I can technically override the client for tests and inject a test implementation. Is this the intended way to use the library or am I missing something?
4 replies