[protobuf] Re: Reflecting Custom Options in Protobuf C#

2016-09-19 Thread Teddy Zhang
Looks like the custom options API is not exposed yet in 3.0. Is there any plan to add that? On Friday, April 29, 2016 at 9:37:11 AM UTC-7, Jon Skeet wrote: > On Thursday, 28 April 2016 22:58:42 UTC+1, TravG wrote: >> >> I'm using Protobufs in C# and wondering how I can get access to custom >>

Re: [protobuf] Default Values vs Missing Values

2016-05-26 Thread Teddy Zhang
I've created an issue for this: https://github.com/google/protobuf/issues/1606 -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [protobuf] Default Values vs Missing Values

2016-05-18 Thread Teddy Zhang
On Wednesday, May 18, 2016 at 11:32:03 AM UTC-7, Feng Xiao wrote: > > > > On Tue, May 17, 2016 at 7:53 PM, Teddy Zhang <losti...@gmail.com > > wrote: > >> I'm really not happy to see that proto3 removed the ability in generate >> code for check whether a fie

Re: [protobuf] Default Values vs Missing Values

2016-05-18 Thread Teddy Zhang
On Wednesday, May 18, 2016 at 11:32:03 AM UTC-7, Feng Xiao wrote: > > > > On Tue, May 17, 2016 at 7:53 PM, Teddy Zhang <losti...@gmail.com > > wrote: > >> I'm really not happy to see that proto3 removed the ability in generate >> code for check whether a fie

Re: [protobuf] Default Values vs Missing Values

2016-05-17 Thread Teddy Zhang
I'm really not happy to see that proto3 removed the ability in generate code for check whether a field exits or not. For a message like this: message Test1 { required int32 a = 1; } If field a is present, the encoded message will have field with id 1 and its value. If the field is not set,

[protobuf] Why ProtoBuf 3 put field numbers in generated classes?

2015-11-24 Thread Teddy Zhang
I notice that for ProtoBuf 3 generated classes, they have fields numbers there. E.g. for C#: > public const int LatitudeFieldNumber = 1; > > private float latitude_; > public float Latitude { > get { return latitude_; } > set { > latitude_ = value; > } >

[protobuf] Re: Enum values are siblings of their type, not children of it.

2015-11-09 Thread Teddy Zhang
Sorry to dig this old thread. I now one of the solution right now is to put the enum to different proto file and put them into different package. But that doesn't really work if the enums are under the same message. I would suggest add an option for c/c++, like below: enum Foo { option

[protobuf] Re: Override ToString behavior in ProtoBuf 3 C# implementation

2015-11-04 Thread Teddy Zhang
+Jon who seems to be the developer on this. On Monday, November 2, 2015 at 6:18:27 PM UTC-8, Teddy Zhang wrote: > > I need to override the ToString behavior in C# to make it human readable. > > E.g. I defined a message type to represent DateTime in C#, and then write > a partia

[protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-10-09 Thread Teddy Zhang
Will the C# implementation support proto2 messages? What is the capability story? I assume the wire format is compatible if no proto3 exclusive features are used? On Tuesday, August 4, 2015 at 5:43:36 AM UTC-7, Jon Skeet wrote: > That looks like you're expecting a protobuf.net-style approach -

[protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-10-09 Thread Teddy Zhang
Will the C# implementation support proto2 message as well? What is the compatibility story between proto2 and proto 3? I assume the wire format is compatible as long as no proto 3 exclusive features are used. On Tuesday, August 4, 2015 at 5:43:36 AM UTC-7, Jon Skeet wrote: > That looks like