What's the .proto equivalent of List<T> in protobuf-net?

Posted by Marc Bollinger on Stack Overflow See other posts from Stack Overflow or by Marc Bollinger
Published on 2010-06-17T22:03:45Z Indexed on 2010/06/17 22:23 UTC
Read the original article Hit count: 306

Filed under:
|
|

To keep some consistency, we use code generation for a lot of our object models, and one of the offshoots of that has been generating the .proto files for ProtocolBuffers via a separate generation module. At this point though, I'm stumped at how to implement the generation for when it happens upon a List<T> object.

It looks like this is possible via contracts:

[ProtoMember(1)]
public List<SomeType> MyList {get; set;} 

but outside of that, I'm not sure how or if it's possible to do this only from creating the .proto file/using the VS custom tool. Any thoughts?

© Stack Overflow or respective owner

Related posts about c#

Related posts about protocol-buffers