Search code examples
protobuf-netprotogen

Protogen generate List<int> instead of int array


Protogen (langver=3) compiles

repeated int32 someInt;

To a int[]. Is there any way to force it to compile to System.Collections.Generic.List<int>?

Most other types (string, or custom types) compile to list. I can implement a workaround, but the cleanest solution for me would be if this could unpack my buffer to a List<int>


Solution

  • Right now: no, not without editing some C#.

    I have on my list adding the ability to choose list/lookup types for a range of reasons including this. I'll try to make sure this gets covered in that change.