In C++, I'm using the call mentioned in the title to obtain the definition of a message in textual form, similar to what you would write in a .proto file. How would I do this with protobuf-net? The goal is to store message definitions in a kind of message registry. But maybe there are other possibilities to represent a message definition at runtime? (a representation of a definition that can be compared).
protobuf-net has a Serializer.GetProto
API (or a RuntimeTypeModel.GetSchema
API - they're the same thing with slightly different inputs); however, note that this is only an approximation of any original schema - meaning: if you do start from .proto via protobuf-net's schema parsing tools, we don't currently store the original schema anywhere, so anything we generate is a best-efforts reconstruction only.