- 07 Mar, 2016 1 commit
-
-
avgweb authored
-
- 04 Feb, 2016 1 commit
-
-
Jon Skeet authored
(Generated code changes in next commit.)
-
- 11 Jan, 2016 1 commit
-
-
Jon Skeet authored
On deserialization, missing values for message types are replaced with a "default" message.
-
- 01 Oct, 2015 1 commit
-
-
Jon Skeet authored
This changes how we approach JSON formatting in general - instead of looking at the field a value came from, we just look at the type of the value. It's possible this *could* be slightly inefficient, but if we start caring about JSON performance deeply, we'll probably want to rewrite all of this anyway. It's definitely simpler this way. When we support dynamic messages, we'll need to modify JsonFormatter to handle enum values, as they won't come be "real" .NET enums at that point. It shouldn't be hard to do though.
-
- 10 Aug, 2015 2 commits
- 08 Aug, 2015 1 commit
-
-
Jon Skeet authored
-
- 06 Aug, 2015 1 commit
-
-
Jon Skeet authored
Now the generated code doesn't need to check for end group tags, as it will skip whole groups at a time. Currently it will ignore extraneous end group tags, which may or may not be a good thing. Renamed ConsumeLastField to SkipLastField as it felt more natural. Removed WireFormat.IsEndGroupTag as it's no longer useful. This mostly fixes issue 688. (Generated code changes coming in next commit.)
-
- 05 Aug, 2015 1 commit
-
-
Jon Skeet authored
Change ReadTag and PeekTag to just use 0 as a return value for "end of stream", rather than using an awkward out parameter. This simplifies quite a lot of code. Generated code in next commit.
-
- 04 Aug, 2015 1 commit
-
-
Jon Skeet authored
-
- 30 Jul, 2015 3 commits
-
-
Jon Skeet authored
Rename ThrowHelper to Preconditions and make it public - we'll want to use it from the generated code soon. Additionally, change it to return the value passed, and make it generic with a class constraint. A separate method doesn't have the class constraint, for more unusual scenarios.
-
Jon Skeet authored
-
Jan Tattermusch authored
-
- 27 Jul, 2015 1 commit
-
-
Jon Skeet authored
This requires .NET 4.5, and there are a few compatibility changes required around reflection. Creating a PR from this to see how our CI systems handle it. Will want to add more documentation, validation and probably tests before merging. This is in aid of issue #590.
-
- 21 Jul, 2015 1 commit
-
-
Jon Skeet authored
Changes in brief: 1. Descriptor is now the entry point for all reflection. 2. IReflectedMessage has gone; there's now a Descriptor property in IMessage, which is explicitly implemented (due to the static property). 3. FieldAccessorTable has gone away 4. IFieldAccessor and OneofFieldAccessor still exist; we *could* put the functionality straight into FieldDescriptor and OneofDescriptor... I'm unsure about that. 5. There's a temporary property MessageDescriptor.FieldAccessorsByFieldNumber to make the test changes small - we probably want this to go away 6. Discovery for delegates is now via attributes applied to properties and the Clear method of a oneof I'm happy with 1-3. 4 I'm unsure about - feedback welcome. 5 will go away 6 I'm unsure about, both in design and implementation. Should we have a ProtobufMessageAttribute too? Should we find all the relevant attributes in MessageDescriptor and pass them down, to avoid an O(N^2) scenario? Generated code changes coming in the next commit.
-
- 17 Jul, 2015 2 commits
- 16 Jul, 2015 1 commit
-
-
Jon Skeet authored
- We do still generate the message types, as otherwise reflection breaks, even though it doesn't actually use those types. - JSON handling hasn't been implemented yet
-
- 09 Jul, 2015 2 commits
-
-
Jon Skeet authored
... and some implementation changes to go with them.
-
Jon Skeet authored
- FieldAccessorTable is now non-generic - We don't have a static field per message type in the umbrella class. (Message descriptors are accessed via the file descriptor.) - Removed the "descriptor assigner" complication from the descriptor fixup; without extensions, we don't need it - MapField implements IDictionary (more tests would be good...) - RepeatedField implements IList (more tests would be good) - Use expression trees to build accessors. (Will need to test this on various platforms... probably need a fallback strategy just using reflection directly.) - Added FieldDescriptor.IsMap - Added tests for reflection with generated messages Changes to generated code coming in next commit.
-
- 30 Jun, 2015 1 commit
-
-
Jon Skeet authored
Prod code works, but some tests are broken. Obviously those need fixing, then more tests, and review benchmarks.
-
- 26 Jun, 2015 1 commit
-
-
Jon Skeet authored
- Change the default message hash code to 1 to be consistent with other code - Change the empty list/map hash code to 0 as "empty map" is equivalent to "no map" - Removed map fields from unittest_proto3.proto - Created map_unittest_proto3.proto which is like map_unittest.proto but proto3-only - Fixed factory methods in FieldCodec highlighted by using all field types :) - Added tests for map serialization: - Extra fields within entries - Entries with value then key - Non-contiguous entries for the same map - Multiple entries for the same key Changes to generated code coming in next commit
-
- 25 Jun, 2015 2 commits