Git Product home page Git Product logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024

Original comment by [email protected] on 19 Aug 2008 at 1:08

Attachments:

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
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

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
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

  • Added labels: Type-Defect
  • Removed labels: Type-Enhancement

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
Fixed in r151, available for download

Original comment by marc.gravell on 19 Aug 2008 at 2:34

  • Changed state: Fixed

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
[deleted comment]

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
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 [email protected] on 19 Aug 2008 at 6:50

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
Second fix applied r153

Original comment by marc.gravell on 20 Aug 2008 at 5:47

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024
Looks great!  Thanks!

Original comment by [email protected] on 20 Aug 2008 at 6:53

from protobuf-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 17, 2024

Original comment by marc.gravell on 23 Sep 2008 at 6:49

  • Changed state: Verified

from protobuf-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.