protobuf net - How to set wire format on a property without changing type definition? -
this type defined in assembly cannot add reference protobuf-net:
[structlayout(layoutkind.sequential)] [xmltype] // xml or protobuf-net serialization public struct pointi { public pointi(int x, int y) { x = x; y = y; } [xmlelement(order = 1)] public int x; [xmlelement(order = 2)] public int y; ... } how can use protobuf.meta.runtimetypemodel.default specify zig-zag storage optimize output size?
var metatype = runtimetypemodel.default.add(typeof(pointi), true); metatype[1].dataformat = metatype[2].dataformat = protobuf.dataformat.zigzag; that ? in other news: mutable structs... bleugh...
Comments
Post a Comment