aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers
Commit message (Collapse)AuthorAgeFilesLines
* Fixes to ByteString's equality handling.Jon Skeet2015-07-161-20/+15
|
* Remove the struct-based iterator for RepeatedField.Jon Skeet2015-07-161-57/+6
| | | | | | We don't use it in the runtime or generated code anywhere now, so the extra small performance boost isn't as critical, and it has some undesirable consequences. The tests have needed to change as iterator block enumerators don't throw when we might expect them to.
* added comment for ByteString.CopyFromJan Tattermusch2015-07-151-0/+2
|
* C# cleanup - assorted nitsJan Tattermusch2015-07-155-10/+3
|
* Don't create nested types (or field accessors) for map types.Jon Skeet2015-07-151-163/+0
| | | | I'm sure I've implemented this before, but somehow it's been lost in a maze of twisty little branches, all alike.
* Generated code for well-known typesJon Skeet2015-07-1411-22/+4672
|
* Generate the well-known types in C#Jon Skeet2015-07-141-0/+10
| | | | | | | | | | 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 4)Jon Skeet2015-07-148-11/+0
| | | | Update code already within Google.Protobuf.Reflection which was importing Google.Protobuf.DescriptorProtos
* Changing reflection namespace (part 3)Jon Skeet2015-07-143-232/+232
| | | | | | | | 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 2)Jon Skeet2015-07-141-93/+93
| | | | Generated code changes from previous commit
* Changing reflection namespace (part 1)Jon Skeet2015-07-1427-2403/+2393
| | | | | | | - Move types into Google.Protobuf.Reflection - Change codegen to reflect that in generated types Generated code changes coming in part 2
* Merge pull request #582 from jskeet/csharp-jsonJon Skeet2015-07-149-71/+749
|\ | | | | JSON formatting in C#
| * Changes suggested during review.Jon Skeet2015-07-142-27/+4
| | | | | | | | | | - Remove the indexers in FieldAccessorTable - Add a TODO for field ordering in oneof
| * Fixes to JsonFormatterJon Skeet2015-07-101-9/+66
| | | | | | | | | | - Handle oneof properly - Omit unknown enum values
| * Generated code changes for previous submitJon Skeet2015-07-101-22/+22
| |
| * Oneof reflection support. (Generated code changes in next commit.)Jon Skeet2015-07-103-35/+66
| |
| * Use the new JsonFormatter to implement ToString on generated messages.Jon Skeet2015-07-101-0/+88
| |
| * Initial implementation of JSON formattingJon Skeet2015-07-105-3/+528
| | | | | | | | | | | | - No parsing - Reflection based, so not hugely efficient - No line breaks or indentation
* | Update Google.Protobuf.nuspecJan Tattermusch2015-07-121-1/+1
| |
* | enable building nuget packageJan Tattermusch2015-07-102-0/+27
|/
* Lots more tests for FieldCodec, MapField, RepeatedFieldJon Skeet2015-07-093-16/+49
| | | | ... and some implementation changes to go with them.
* Fix descriptor reflection in various waysJon Skeet2015-07-0916-374/+150
| | | | | | | | - The protos are no longer publicly exposed at all - Oneof detection now works (as we default to -1, not 0) - OneofDescriptor exposes the fields in the oneof - Removed unnecessary code for replacing protos - remnant of extensions - There's now just the non-generic form of IDescriptor
* Regenerated code due to previous commit.Jon Skeet2015-07-091-175/+263
| | | | Note that now we need a proto3 version of addressbook.proto. This may affect other platforms, and could do with an overhaul to follow proto3 conventions anyway (e.g. repeated field names). Will need to think about that carefully before merging into master. Raised issue #565 for this.
* Changes to generated code due to previous commit.Jon Skeet2015-07-091-181/+134
|
* Implement reflection properly for fields.Jon Skeet2015-07-0913-219/+296
| | | | | | | | | | | | | - 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.
* Fix copyright lines for all C# code.Jon Skeet2015-06-3043-161/+367
| | | | | | Everything should now be consistent - the only difference between files is the year (aside from generated files). Fixes issue #531.
* Tidying up and extra tests.Jon Skeet2015-06-309-225/+282
| | | | This is mostly just making things internal instead of public, removing and reordering a bunch of code in CodedInputStream/CodedOutputStream, and generally tidying up.
* First pass (not yet compiling) at removing all the array handling code from ↵Jon Skeet2015-06-306-1006/+321
| | | | | | | Coded*Stream. Prod code works, but some tests are broken. Obviously those need fixing, then more tests, and review benchmarks.
* Remove a lot of code which wasn't needed any more.Jon Skeet2015-06-2619-1088/+59
|
* Tests for FieldCodec, along with a fix.Jon Skeet2015-06-261-1/+1
|
* Generated code changes for previous commit.Jon Skeet2015-06-261-22/+22
|
* Tweaks and more tests for mapsJon Skeet2015-06-263-5/+14
| | | | | | | | | | | | | | | - 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
* Generated code changes due to map changes.Jon Skeet2015-06-251-22/+44
| | | | (Primarily this is starting the hash code of messages at a non-zero value...)
* More map tests, and various production code improvements.Jon Skeet2015-06-252-33/+59
| | | | Generated code in next commit.
* First pass at map support.Jon Skeet2015-06-254-0/+588
| | | | More tests required. Generated code in next commit.
* Implement freezing for messages and repeated fields.Jon Skeet2015-06-245-148/+694
| | | | Fixes issue #523.
* Generated code changes from previous commit.Jon Skeet2015-06-231-22/+22
|
* Implement requested changes for IMessage<T>Jon Skeet2015-06-231-4/+5
| | | | | 1) New line at end of file 2) Make IMessage<T> itself extend IEquatable<T> and IDeepCloneable<T>
* Implement Clone.Jon Skeet2015-06-234-45/+306
| | | | Fixes issue #527.
* Minor cleanup.Jon Skeet2015-06-1910-178/+180
| | | | | | | | - 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
* Use an empty array instead of a null reference for an empty repeated field.Jon Skeet2015-06-191-22/+10
|
* Use our "local" copy of Encoding.UTF8 in CodedInputStream too.Jon Skeet2015-06-173-7/+8
|
* Delete "lite" project and serialization project+codeJon Skeet2015-06-171-99/+0
| | | | We'll probably want a lot of the code from the serialization project when we do JSON, but enough of it will change that it's not worth keeping in a broken state for now.
* Regenerated files.Jon Skeet2015-06-171-3/+3
|
* Use the fact that we know the tag size and bytes at codegen time to optimize.Jon Skeet2015-06-173-834/+461
|
* Regenerate proto filesJon Skeet2015-06-121-253/+355
|
* Reimplement RepeatedField<T> using an array as the backing store.Jon Skeet2015-06-123-45/+224
| | | | | | | | | | This is effectively reimplementing List<T>, but with a few advantages: - We know that an empty repeated field is common, so don't allocate an array until we need to - With direct access to the array, we can easily convert enum values to int without boxing - We can relax the restrictions over what happens if the repeated field is modified while iterating, avoiding so much checking This is somewhat risky, in that reimplementing a building block like this is *always* risky, but hey... (The performance benefits are significant...)
* Simplify ComputeInt32Size to call ComputeInt32SizeNoTag.Jon Skeet2015-06-121-11/+1
|
* Optimization to avoid foreach over empty lists.Jon Skeet2015-06-121-9/+64
|
* Fix incorrect handling of non-seekable streams.Jon Skeet2015-06-121-2/+2
| | | | | | This mirrors commit 7c86bbbc7a3365c034d82173b38ec4427b98b3b2 in the pull request to the main protobuf project, but also reduces the size of the buffer created. (There's no point in creating a 1024-byte buffer if we're only skipping 5 bytes...)