Protogen 生成 List<int>而不是 int 数组 [英] Protogen generate List<int> instead of int array
问题描述
Protogen (langver=3) 编译
Protogen (langver=3) compiles
repeated int32 someInt;
到一个 int[]
.有没有办法强制它编译为System.Collections.Generic.List
?
To a int[]
. Is there any way to force it to compile to System.Collections.Generic.List<int>
?
大多数其他类型(字符串或自定义类型)编译为列表.我可以实现一个解决方法,但对我来说最干净的解决方案是,如果这可以将我的缓冲区解压缩到 List
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>
推荐答案
现在:不,必须编辑一些 C#.
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.
这篇关于Protogen 生成 List<int>而不是 int 数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!