Closed GoogleCodeExporter closed 8 years ago
My assumption is (perhaps incorrectly) that you'd only want to generate a
.proto for
a top-level message (which an enum can't be) - but it won't be hard to fix...
I'll
see what I can do
Original comment by marc.gravell
on 19 Aug 2008 at 1:47
Have added unit test for this, and the enum is not emitted; I have
re-classified as
defect (I incorrectly set it as enhancement) - will fix ASAP.
Original comment by marc.gravell
on 19 Aug 2008 at 1:55
Fixed in r151, available for download
Original comment by marc.gravell
on 19 Aug 2008 at 2:34
[deleted comment]
Thanks for the quick response!
The fix from r151 has a bug. The declared name of the enum is not honoring
ProtoContractAttribute.Name when the type is output, but it is honored in the
declaration of the referencing message. So, in the following example,
generated from
the TestProto.cs I uploaded earlier, "TestEnum" should be called "Type".
message testmsg {
optional Type type = 1;
optional string foo = 2;
}
enum TestEnum {
FOO_KEY = 0;
BAR_KEY = 1;
}
As an aside, I also noticed that class properties returning nullable bools or
enums
are generated as type int32. Is that intentional?
Original comment by brian.c....@gmail.com
on 19 Aug 2008 at 6:50
Second fix applied r153
Original comment by marc.gravell
on 20 Aug 2008 at 5:47
Looks great! Thanks!
Original comment by brian.c....@gmail.com
on 20 Aug 2008 at 6:53
Original comment by marc.gravell
on 23 Sep 2008 at 6:49
Original issue reported on code.google.com by
brian.c....@gmail.com
on 19 Aug 2008 at 1:08