Comments (9)
Original comment by [email protected]
on 19 Aug 2008 at 1:08
Attachments:
from protobuf-net.
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.
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.
Fixed in r151, available for download
Original comment by marc.gravell
on 19 Aug 2008 at 2:34
- Changed state: Fixed
from protobuf-net.
[deleted comment]
from protobuf-net.
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.
Second fix applied r153
Original comment by marc.gravell
on 20 Aug 2008 at 5:47
from protobuf-net.
Looks great! Thanks!
Original comment by [email protected]
on 20 Aug 2008 at 6:53
from protobuf-net.
Original comment by marc.gravell
on 23 Sep 2008 at 6:49
- Changed state: Verified
from protobuf-net.
Related Issues (20)
- Suffix missing for required non-primitive properties HOT 2
- global:: prefix forgot when generate field and property
- Concurrent dictionarys and linked lists goes null on serializing/deserializing.
- Calling GetSchema can cause call to serialize to throw an exception
- Method to detect built-in types
- Await/async proposal HOT 9
- Invalid proto data with TimeSpan via GetSchema() HOT 1
- Please add Windows Phone 8.1 to PCL version HOT 1
- protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll should target v4.0.30319, not v2.0.50727
- Custom serializer works in debug - not in release HOT 5
- Won't build to Windows Phone 8
- Exception due to code in default constructor HOT 3
- I think with 100 runs of same code on same data I can see all exception of protobuf-net !! HOT 5
- Need Help Getting Started HOT 2
- Protobuf.net 'IsDefined' logical bug?
- Deserializing Dictionary<string, List<T>> leads to An element with the same key already exists in the dictionary.
- sub-classes serialization
- Precompiler failed to process asm which targets .NET Framework 3.5
- Value null exception
- Protobuf error System.Xml.Writer wrong assembly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf-net.