print out each field in a message

27 views
Skip to first unread message

lasse

unread,
Jun 21, 2011, 2:21:38 AM6/21/11
to prot...@googlegroups.com
How to I use reflections to print out each field in a message? I have the .proto file.

I would love so see an example in csharp showing how to do this.

One idea is ProtoDump in the protobuf-csharp-port project, but I am currently using protobuf-net (can switch).

Jason Hsueh

unread,
Jun 22, 2011, 12:40:08 PM6/22/11
to prot...@googlegroups.com
Your best bet is to look at the other C# projects; we don't maintain any C# code. However, TextFormat in the C++ implementation does exactly this, so you might be able to use that as a starting point. Of course the reflection APIs may be different in the other implementations.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/HBY5mGSTerIJ.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Reply all
Reply to author
Forward
0 new messages