Open GoogleCodeExporter opened 9 years ago
enums in the protobuf spec are 32-bit, not 64-bit - hence my options are
limited. A v1 workaround would be to add a private shim property that simply
casts to/from long:
public YourEnum Foo {get;set;}
private long FooSerialized {
get {return (long)Foo;} set {Foo=(YourEnum)value;}
}
In v2 I am adding support for (otpionally) treating enums as primitives,
without any of the usual protobuf logic/constraints that surround enums.
Original comment by marc.gravell
on 16 Sep 2010 at 6:53
Hello,
"In v2 I am adding support for (otpionally) treating enums as primitives,
without any of the usual protobuf logic/constraints that surround enums."
Was that feature ever added to v2?
Regards,
Chris.
Original comment by chris.lo...@gmail.com
on 14 Oct 2011 at 5:13
This has been unanswered for a long time, so it seems worth asking the question
again - is there a way in v2 to serialize long enums?
Original comment by paulbsm...@gmail.com
on 3 Jan 2014 at 5:19
Original issue reported on code.google.com by
andre.ve...@gmail.com
on 16 Sep 2010 at 4:10Attachments: