aboutsummaryrefslogtreecommitdiff
path: root/src/google
Commit message (Collapse)AuthorAgeFilesLines
* Handle field names of "descriptor" and "types".Jon Skeet2015-07-311-1/+7
|
* refactor umbrella class helpersJan Tattermusch2015-07-306-34/+28
|
* Merge pull request #632 from google/csharp-experimentalJan Tattermusch2015-07-3073-2303/+1961
|\ | | | | Merge C# proto3 from csharp-experimental to master
| * Prohibit null values for string/bytes fields in generated code.Jon Skeet2015-07-302-13/+2
| |
| * More freezing tidy-up; generated code in next commit.Jon Skeet2015-07-301-3/+1
| |
| * remove the freeze APIJan Tattermusch2015-07-298-46/+2
| |
| * Fix attribute mistake and regenerate code.Jon Skeet2015-07-221-2/+0
| |
| * Remove the usage of attributes for field/method discovery.Jon Skeet2015-07-2212-50/+96
| | | | | | | | Instead, introduce GeneratedCodeInfo which passes in what we need, and adjust the codegen to take account of this.
| * Revamp to reflection.Jon Skeet2015-07-2113-99/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Merge pull request #629 from google/masterJon Skeet2015-07-2114-1420/+1688
| |\ | | | | | | Integrate changes from upstream/master into csharp-experimental
| * \ Merge pull request #611 from jskeet/csharp-wrappersJon Skeet2015-07-179-34/+463
| |\ \ | | | | | | | | C# wrapper types
| | * | Fixes from PR review.Jon Skeet2015-07-171-1/+0
| | | |
| | * | First pass at wrapper types.Jon Skeet2015-07-166-70/+93
| | | | | | | | | | | | | | | | | | | | - 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
| | * | First part of implementing wrapper types. Not ready yet!Jon Skeet2015-07-166-16/+423
| | | |
| * | | Merge pull request #586 from jtattermusch/csharp_names_exportJan Tattermusch2015-07-165-5/+82
| |\ \ \ | | |/ / | |/| | Export c# naming routines publicly
| | * | export c# naming routines publiclyJan Tattermusch2015-07-105-5/+82
| | | |
| * | | Merge remote-tracking branch 'upstream/master' into csharp-experimentalJan Tattermusch2015-07-1522-262/+287
| |\ \ \
| * | | | Address requested change from code review.Jon Skeet2015-07-151-12/+12
| | | | |
| * | | | Don't create nested types (or field accessors) for map types.Jon Skeet2015-07-153-2/+33
| | | | | | | | | | | | | | | | | | | | I'm sure I've implemented this before, but somehow it's been lost in a maze of twisty little branches, all alike.
| * | | | Generate the well-known types in C#Jon Skeet2015-07-1411-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involves: - Specifying a namespace in each proto (including ones we'd previously missed) - Updating the generation script - Changing codegen to implement IReflectedMessage.Fields explicitly (a good thing anyway) - Changing reflection tests to take account of the explicit interface implementation Non-generated code in this commit; generated code to follow
| * | | | Changing reflection namespace (part 3)Jon Skeet2015-07-148-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the C# namespace in descriptor.proto to Google.Protobuf.Reflection. This then means changing where the generated code lives, which means updating the project file... It also involves regenerating the C++ - which has updated the well-known types as well, for no terribly obvious reason...
| * | | | Changing reflection namespace (part 1)Jon Skeet2015-07-142-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move types into Google.Protobuf.Reflection - Change codegen to reflect that in generated types Generated code changes coming in part 2
| * | | | Convert package name to PascalCase for C# namespaceJon Skeet2015-07-142-3/+11
| | | | | | | | | | | | | | | | | | | | Fixes issue 312.
| * | | | Oneof reflection support. (Generated code changes in next commit.)Jon Skeet2015-07-101-0/+1
| | | | |
| * | | | Use the new JsonFormatter to implement ToString on generated messages.Jon Skeet2015-07-103-6/+7
| | |/ / | |/| |
| * | | Codegen changes to support descriptor runtime changesJon Skeet2015-07-0911-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | - Add a partial method called by all constructors - Generate internal classes for descriptor.proto (only) - Forbid proto2 descriptors except for descriptor.proto
| * | | Implement reflection properly for fields.Jon Skeet2015-07-092-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
| * | | Remove unused code in C# codegenJon Skeet2015-06-302-47/+1
| | | |
| * | | First pass (not yet compiling) at removing all the array handling code from ↵Jon Skeet2015-06-303-102/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Coded*Stream. Prod code works, but some tests are broken. Obviously those need fixing, then more tests, and review benchmarks.
| * | | Fix for doubly-nested types - issue #307.Jon Skeet2015-06-291-1/+1
| | | | | | | | | | | | | | | | No specific test case - if the generated code compiles, the issue is fixed :)
| * | | More cleanup, based around searches for "Google.ProtocolBuffers"Jon Skeet2015-06-2626-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove some old proto2-based C#-only messages - Remove the "build" directory which only contained out-of-date files - Remove the csharp_namespace option from proto2 messages - Change "Google.ProtocolBuffers" to "Google.Protobuf" in other messages
| * | | Tweaks and more tests for mapsJon Skeet2015-06-263-6/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
| * | | More map tests, and various production code improvements.Jon Skeet2015-06-251-1/+2
| | | | | | | | | | | | | | | | Generated code in next commit.
| * | | First pass at map support.Jon Skeet2015-06-2513-10/+261
| | | | | | | | | | | | | | | | More tests required. Generated code in next commit.
| * | | Regenerated descriptor C++ codeJon Skeet2015-06-251-3/+2
| | | |
| * | | Revert the change to wire_format.h.Jon Skeet2015-06-245-4/+16
| | | | | | | | | | | | | | | | | | | | It seems too much code relies on the broken behaviour. See issue #493. Instead, we reimplement MakeTag just for C#, temporarily.
| * | | Implement freezing for messages and repeated fields.Jon Skeet2015-06-2413-8/+82
| | | | | | | | | | | | | | | | Fixes issue #523.
| * | | Merge remote-tracking branch 'upstream/master' into fix_appveyorJan Tattermusch2015-06-242-9/+13
| |\ \ \
| * | | | Implement requested changes for IMessage<T>Jon Skeet2015-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 1) New line at end of file 2) Make IMessage<T> itself extend IEquatable<T> and IDeepCloneable<T>
| * | | | Implement Clone.Jon Skeet2015-06-2313-8/+95
| | | | | | | | | | | | | | | | | | | | Fixes issue #527.
| * | | | Merge remote-tracking branch 'upstream/master' into proto3-onlyJon Skeet2015-06-1991-55/+27977
| |\ \ \ \
| * | | | | Minor cleanup.Jon Skeet2015-06-193-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make some members internal - Remove a lot of FrameworkPortability that isn't required - Start adding documentation comments - Remove some more group-based members - Not passing in "the last tag read" into Read*Array, g
| * | | | | Merged masterJon Skeet2015-06-1732-610/+597
| |\ \ \ \ \
| * | | | | | Use the fact that we know the tag size and bytes at codegen time to optimize.Jon Skeet2015-06-178-30/+77
| | | | | | |
| * | | | | | Fix oneof generator - forgot to provide variables...Jon Skeet2015-06-121-0/+1
| | | | | | |
| * | | | | | Move Count checks into the serialization codeJon Skeet2015-06-123-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I wouldn't expect this to affect anything, but it appears to.
| * | | | | | Optimization of CalculateSize: avoid foreach over empty lists.Jon Skeet2015-06-123-12/+10
| | | | | | |
| * | | | | | Use Length to check string/bytes fields for emptiness - it's faster than an ↵Jon Skeet2015-06-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | equality check.
| * | | | | | Fix oneof behaviour in the face of default values.Jon Skeet2015-06-121-9/+4
| | | | | | |
| * | | | | | Coded*Stream streamlining.Jon Skeet2015-06-127-42/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove ICodedInputStream and ICodedOutputStream, and rewrite CodedInputStream and CodedOutputStream to be specific to the binary format. If we want to support text-based formats, that can be a whole different serialization mechanism.