aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers
Commit message (Collapse)AuthorAgeFilesLines
* 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...)
* Coded*Stream streamlining.Jon Skeet2015-06-1210-1754/+423
| | | | 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.
* Reimplement enums as int values, and get rid of EnumHelper.Jon Skeet2015-06-118-148/+67
| | | | This makes repeated fields really awkward at the moment - but when we reimplement RepeatedField<T> to be backed by an array, we can cast the array directly...
* Optimize WriteRawInt32 for the common case of a value < 128, which is a ↵Jon Skeet2015-06-111-0/+7
| | | | | | single byte. Aside from anything else, this will be used for all tags for fields 1-15.
* Improve string encoding times.Jon Skeet2015-06-112-5/+17
| | | | | Cache a reference to Encoding.UTF8 - the property access is (rather surprisingly) significant. Additionally, when we detect that the string is all ASCII (due to the computed length in bytes being the length in characters), we can perform the encoding very efficiently ourselves.
* Use expression trees to avoid boxing when converting enums.Jon Skeet2015-06-091-4/+12
|
* First pass at the mutable API. Quite a bit more to do - in particular, it's ↵Jon Skeet2015-06-0996-21534/+3765
| | | | pretty slow right now.
* Change the C# enum generator inherit from primitive generatorJie Luo2015-05-291-96/+616
|
* Add oneof support for C#Jie Luo2015-05-2916-18/+452
|
* Merge pull request #394 from ironhidegames/csharp-aot-iosJan Tattermusch2015-05-211-3/+15
|\ | | | | Solves AOT compilation issue for Unity - iOS
| * added concrete IEqualityComparer<ExtensionIntPair> implementation in ↵Ruben Garat2015-05-201-3/+15
| | | | | | | | ExtensionRegistryLite.cs to prevent AOT compilation issue with unity in iOS
* | Generate *all* protos in the script, applying fixups.Jon Skeet2015-05-161-111/+104
|/ | | | | | | | | | | | | | We still have some protos which aren't generated how we want them to be: - Until we have an option to specify the "umbrella" class, DescriptorProtoFile will be broken. (The change of name here affects the reflection descriptor, which accounts for most of the change. That's easier than trying to work out exactly which occurrences of Descriptor need changing though.) - That change affects UnittestCustomOptions - Issue #307 breaks Unittest.cs After this commit, we don't have the record of the fixups in the files themselves any more, but one centralized record in the shell script.
* Performance optimization for small messages without unknown fieldsJan Tattermusch2015-05-071-4/+24
|
* fix commentsJie Luo2015-05-013-5/+4
|
* fix commends from Jon SkeetJie Luo2015-04-303-20/+9
|
* Merge branch 'csharp' of git://github.com/google/protobuf into google-csharpJie Luo2015-04-307-31/+26
|\
| * Convert both the full and lite runtimes (and json/xml serialization ↵Jon Skeet2015-04-297-31/+26
| | | | | | | | | | | | | | assemblies) to be Portable Class Libraries. All referring projects are now .NET 4 client rather than .NET 3.5. This commit also fixes up the ProtoBench app, which I'd neglected in previous commits. (Disentangling the two sets of changes would be time-consuming.)
* | Merge branch 'csharp' of git://github.com/google/protobuf into google-csharpJie Luo2015-04-2942-3221/+1
|\|
| * Remove CLS compliance from runtime code.Jon Skeet2015-04-2916-130/+1
| | | | | | | | We need to remove it from the generator too; I'll raise a github issue for that.
| * Remove support for Serializable.Jon Skeet2015-04-293-203/+0
| | | | | | | | | | This could potentially be added back in later, but its use is limited and it's a pain in terms of support in PCL environments. One use that has been highlighted is passing objects between AppDomains; we'd recommend passing a byte array explicitly and reparsing on the other side.
| * Remove RPC support.Jon Skeet2015-04-297-453/+0
| | | | | | | | It is expected that third parties will generate service/RPC code themselves - see gRPC as an example.
| * Remove a bunch of files which are no longer relevant:Jon Skeet2015-04-2918-2435/+0
| | | | | | | | | | | | 1) Project files for different configurations - we're going to look at all this again, ideally to just have a single PCL-compatible build 2) ProtoGen - the C++ generator is now the only one we care about 3) Proto files - these are mostly duplicates (or older versions) of the ones in the common directories