Commit Graph

751 Commits

Author SHA1 Message Date
Jon Skeet
228530e2da Support creating FileDescriptors dynamically from binary data.
Related to #658 and #5007.
2018-08-20 22:00:02 +01:00
Feng Xiao
a4862e790e Update generated descriptors. 2018-08-08 17:21:04 -07:00
Adam Cozzette
94d55e5292 Merge branch '3.6.x' into merge-3-6-x 2018-08-01 13:44:55 -07:00
Adam Cozzette
9e1286b949 Updated version numbers to 3.6.1 2018-07-27 13:30:28 -07:00
Paul Yang
8705adc228
Give a specific category to each test. (#4965)
* Give a unique category to each test.

This change introduce a TestCategory enum to ConformanceRequest. Existing tests
are divided into three categories: binary format test, json format test and json
format (ignore unknown when parsing) test. For the previous two categories, there
is no change to existing testee programs. For tests with the last category, testee programs
should either enable ignoring unknown field during json parsing or skip the test.

* Fix python test

* Fix java

* Fix csharp

* Update document

* Update csharp generated code
2018-07-27 12:24:42 -07:00
Jan Tattermusch
f50be7de91 Fix C# nuget build on Kokoro (#4912)
* upgrade dotnet SDK to 2.1.3 on kokoro linux
2018-07-18 11:04:59 -07:00
Paul Yang
26eeec93e4
Enable ignoring unknown in json parsing in php (#4839)
* Enable ignoring unknown in json parsing in php

* Update generated descriptor files

* Update failure list for other languages.

* Remove unnecessary php files
2018-07-09 14:29:23 -07:00
Warren Falk
96833b8f4b implement IComparable and comparison operators on Timestamp (#4318) 2018-07-09 14:26:36 -07:00
Adam Cozzette
d6f346b4d5
Merge pull request #4827 from acozzette/merge-3-6-x
Merge 3.6.x branch into master
2018-06-25 15:52:29 -07:00
Sydney Acksman
3d603f481e Remove protoc conditional properties (#4817)
* Remove protoc conditional properties

* Fix duplicate brace
2018-06-25 15:21:30 -07:00
Adam Cozzette
82d3d7d250 Merge branch '3.6.x' into merge-3-6-x 2018-06-25 13:22:10 -07:00
Sebastian Schuberth
ee03556df9 Remove the executable bit from several source code files
This potentially avoids compiler warnings.
2018-06-25 08:17:39 +02:00
Sydney Acksman
1f77342b78 Add msbuild targets to C# tools for protoc compilers (#4648)
* Added props to C# tools

* Add targets file to makefile.am
2018-06-21 14:53:31 -07:00
Adam Cozzette
9d64d740a1 Removed duplicate using statement from ReflectionUtil.cs 2018-05-29 14:29:59 -07:00
Jisi Liu
45eb28b588 Update version number to 3.6.0 2018-05-14 16:06:22 -07:00
Cameron Taggart
394866c002 enable source link for csharp (#4179) 2018-05-14 13:46:03 -07:00
Paul Yang
b61dd9d9a2
Add file option php_metadata_namespace and ruby_package (#4609) 2018-05-11 13:57:06 -07:00
David Chennells
513b35dc4e Add VS2017 optional component dependency details to the C# readme (#4128)
Add mention to the "Build" section of the ReadMe of the requirement of installing an optional component to VS2017.
2018-05-03 15:59:36 -07:00
Jon Skeet
1b219a174c Fix to allow AOT compilers to play nicely with reflection
With this fix, Unity using IL2CPP should work with one of two
approaches:

- Call `FileDescriptor.ForceReflectionInitialization<T>` for every
  enum present in generated code (including oneof case enums)
- Ensure that IL2CPP uses the same code for int and any int-based
  enums

The former approach is likely to be simpler, unless IL2CPP changes
its default behavior. We *could* potentially generate the code
automatically, but that makes me slightly uncomfortable in terms of
generating code that's only relevant in one specific scenario. It
would be reasonably easy to write a tool (separate from protoc) to
generate the code required for any specific set of assemblies, so
that Unity users can include it in their application. We can always
decide to change to generate it automatically later.
2018-04-27 16:47:46 +01:00
Sydney Acksman
4ca46ede5c Write messages to backing field in generated C# cloning code (#4440)
* Edited MessageFieldGenerator to clone to backing field instead of property

* Generated C# proto code
2018-04-19 11:57:31 -07:00
Jon Skeet
da3ce67171 Deliberately call simple code to avoid Unity linker pruning
The SampleEnumMethod method was previously only called via
reflection, so the Unity linker thought it could be removed. Ditto
the parameterless constructor in ReflectionHelper.

This PR should avoid that issue, reducing the work needed by
customers to use Google.Protobuf from Unity.
2018-04-06 08:05:32 +01:00
Feng Xiao
e7e6c6b8d1
Merge pull request #4283 from ObsidianMinor/csharp/better-test-runners
[C#] Update test project to be used with dotnet test and Visual Studio Test Explorer
2018-04-04 17:01:09 -07:00
ObsidianMinor
f72ac9f987 Updated csharp/README.md to reflect testing changes 2018-04-04 16:04:12 -05:00
Paul Yang
c931743461
Merge branch (#4466)
* Fix setup.py for windows build.

* Bump version number to 3.5.2

* Cat the test-suite.log on errors for presubits
2018-04-02 15:55:28 -07:00
Jon Skeet
9c05c35341 Address review comments 2018-03-27 10:17:44 +01:00
Jon Skeet
8e23d4e49c Work around an "old runtime" issue with reflection
For oneofs, to get the case, we need to call the property that
returns the enum value. We really want it as an int, and modern
runtimes allow us to create a delegate which returns an int from the
method. (I suspect that the MS runtime has always allowed that.)
Old versions of Mono (e.g. used by Unity3d) don't allow that, so we
have to convert the enum value to an int via boxing. It's ugly, but
it should work.
2018-03-27 08:42:27 +01:00
Jon Skeet
aa59eaa77b Introduce a compatiblity shim to support .NET 3.5 delegate creation 2018-03-27 08:42:27 +01:00
Jon Skeet
8ba420f040 Change C# reflection to avoid using expression trees
This should work on Unity, Mono and .NET 3.5 as far as I'm aware.
It won't work on platforms where reflection itself is prohibited,
but that's a non-starter basically.
2018-03-27 08:42:26 +01:00
Adam Cozzette
ed4321d1cb
Merge pull request #4387 from acozzette/down-integrate
Integrated internal changes from Google
2018-03-20 16:14:32 -07:00
Feng Xiao
88a4884b55
Merge pull request #4345 from jskeet/list-json-null
Allow null value in JSON representation of ListValue
2018-03-20 15:19:42 -07:00
Adam Cozzette
b1216d95db Updated checked-in generated code 2018-03-14 11:17:06 -07:00
Jon Skeet
822b924d59 Allow list values to be null when parsing 2018-03-01 13:20:40 +00:00
ObsidianMinor
e823897005 Updated NUnit packages, removed NUnitLite added packages for dotnet and Visual Studio, changed dotnet command in buildall to dotnet test, and deleted Program.cs (because it's no longer required). 2018-02-06 12:59:20 -06:00
John Brock
864df890a7 Remove 64MB memory limit when deserializing messages in C#
Increased `CodedInputStream.DefaultSizeLimit` to `Int32.MaxValue` to make it consistent with the Java implementation.
2018-01-31 14:08:02 -08:00
Jon Skeet
0c52335587 Update .NET SDK to 2.0.3
This will allow SourceLink as per #4179, and mean that we can use C#
7.0 language features in the library (but not in generated code).
This does not affect which platforms we're *targeting*, so end users
won't see any difference.

It would be nice to update to 2.1.4, but AppVeyor's "Visual Studio
2017" environment is only 2.0.3.
2018-01-25 19:42:15 +00:00
Jon Skeet
47b7d2c7ca Add DiscardUnknownFields support for C#
By default, unknown fields are preserved when parsing. To discard
them, use a parser configured to do so:

var parser = MyMessage.Parser.WithDiscardUnknownFields(true);
2018-01-15 02:53:45 -05:00
Jisi Liu
383a4941d5 Merge remote-tracking branch 'origin/3.5.x' into master 2018-01-03 09:28:40 -08:00
Jisi Liu
d106399d39
Merge pull request #4072 from google/jieluo
Cherrypick for csharp, including:
2017-12-19 17:45:56 -08:00
Jie Luo
b308580bb1 Cherrypick for csharp, including:
Add preserve UnknownFields
Compare floating point values bitwise
Add auto-generated header to C# generated files
2017-12-19 15:38:02 -08:00
Jisi Liu
050fc9a437 Update version number to 3.5.1 2017-12-19 11:00:33 -08:00
Jan Tattermusch
426cf6f31e Add auto-generated header to C# generated files (#4038)
* Add auto-generated header to C# generated files

* regenerate C# protos
2017-12-13 14:36:29 -08:00
Jie Luo
bfd254e14f
Add unknown field support for csharp (#3936)
Add unknown field support for csharp
2017-12-13 13:48:58 -08:00
Feng Xiao
75eceb8424 Update generated code. 2017-12-12 14:57:34 -08:00
Jon Skeet
31c54d1289 Regenerated code from previous C# codegen commit
With this in place, all tests should pass.

Fixes #3725.
2017-12-09 09:49:24 +00:00
Jon Skeet
f3e9a65d75 Compare floating point values bitwise in C#
This is the manual code part of the Google.Protobuf library, and tests.
Some tests will fail until codegen is changed and rerun.
2017-12-09 09:49:24 +00:00
Adam Cozzette
0ba8eea655 Merge branch 'master' into down-integrate 2017-12-01 10:05:19 -08:00
Adam Cozzette
92a7e778e7 Integrated internal changes from Google 2017-12-01 10:05:10 -08:00
Adam Cozzette
a27da09339 Merge branch '3.5.x' into 3.5.x-merge 2017-11-30 13:34:51 -08:00
Jie Luo
6d6099553b
Update csharp version number (#3958) 2017-11-29 16:10:44 -08:00
Jon Skeet
74f64b667c Fix JsonTokenizer exception message 2017-11-29 07:14:57 +00:00
Jon Skeet
91ff83c024 Remove non-C# options from C#-only test protos 2017-11-14 07:31:59 +00:00
Jon Skeet
8cf53f8dfc MMinor fix-ups to C# tests from changes in earlier commits 2017-11-12 15:29:15 +00:00
Jon Skeet
b5cdf0eac6 Regenerated test code for C# 2017-11-12 15:29:15 +00:00
Jon Skeet
aa77eab622 Move C#-only test protos to csharp/protos
unittest_proto3 had been changed in a very backward-incompatible
way which was never going to work with C# as it imports proto2 messages.

This is now a copy of the old file, but with a package name change for
compatibility with the remaining files in src/google/protobuf.

The other moves are for files that are only used by C#.
2017-11-12 15:29:15 +00:00
Jan Tattermusch
5f96191459 ParseFrom<T> for array slice is missing 2017-11-10 09:01:32 +01:00
Jan Tattermusch
4a5e1bd043 check already performed by MergeFrom 2017-11-10 09:01:07 +01:00
Jan Tattermusch
435f61102b allow message parsing from an array slice 2017-11-10 09:00:52 +01:00
Jan Tattermusch
30b6e54327 ParseFrom<T> for array slice is missing 2017-11-09 18:33:15 +01:00
Jan Tattermusch
07542e78da check already performed by MergeFrom 2017-11-09 18:27:45 +01:00
Jan Tattermusch
0c874a6a19 allow message parsing from an array slice 2017-11-09 14:23:14 +01:00
Jisi Liu
97dd175a91 Update version number to 3.5.0 2017-11-02 14:16:22 -07:00
Jon Skeet
cbe250591f Fix merging with message-valued oneof
If messages A and B have the same oneof case, which is a message
type, and we merge B into A, those sub-messages should be merged.

Fixes #3200.

Note that I haven't regenerated all the code, as some of the protos
have been changed, breaking generation.
2017-10-31 17:11:40 -07:00
xuwei-k
05b56d01c1 update joda-time javadoc url 2017-10-30 17:48:54 +09:00
Jon Skeet
e8c9ae1209 Add parser settings WithXyz methods 2017-10-28 07:47:43 +01:00
Jon Skeet
a985451253 Add JsonParser setting to ignore unknown field values
Note that the default behavior is still to throw an exception; you
need to opt into ignoring unknown fields.

Fixes #2838.
2017-10-28 07:47:43 +01:00
Jisi Liu
ecf2957106 Update descriptor protos 2017-10-18 14:21:22 -07:00
Jisi Liu
de15e73d58 Merge remote-tracking branch 'origin/3.4.x' into master 2017-10-11 14:44:03 -07:00
Jisi Liu
dba647a6b2 Bump version for minor release 2017-09-14 11:12:55 -07:00
Adam Cozzette
13fd045dbb Integrated internal changes from Google 2017-09-14 10:03:57 -07:00
Jan Tattermusch
5de05654aa Google.Protobuf should target net45 2017-09-12 11:56:34 +02:00
Feng Xiao
49b31dc5f7 Update C# generated file for addressbook.proto 2017-09-11 14:43:14 -07:00
Jan Tattermusch
50a64759dd Google.Protobuf should target net45 2017-09-05 17:59:03 +02:00
Paul Yang
2807436cd8 change the field number of php_generic_service to fix the conflict with (#3576)
internal descriptor.proto
2017-08-30 16:50:07 -07:00
Jisi Liu
139775ccc0 Merge remote-tracking branch 'origin/3.4.x' into mergemaster 2017-08-18 16:25:35 -07:00
Jon Skeet
e0d24cc84a Detect invalid tags with a field number of 0 in C#
Previously we only rejected the tag if the tag itself was 0, i.e.
field=0, type=varint. The type doesn't matter: field 0 is always
invalid.

This removes the last of the C# conformance failures.
2017-08-11 19:33:53 +01:00
Bo Yang
8f4b8e430a Merge branch 'master' into 3.4.x 2017-08-05 10:42:29 -07:00
Jisi Liu
6c64f11778 Bump csharp version 2017-08-02 13:20:13 -07:00
Thomas Van Lenten
9a4692d8af Update the comment on the message_type to cover what it should be. 2017-07-26 17:07:01 -04:00
Jisi Liu
759245a49a Merge from master 2017-07-25 11:52:33 -07:00
Jisi Liu
7bb39bef1a Update version number for 3.4.0 2017-07-24 16:03:49 -07:00
Yilun Chong
a713b73076 Merge pull request #3281 from BSBandme/ConformanceTestYilunChong
Proto2 test message support to conformance test
2017-07-24 14:50:52 -07:00
Paul Yang
50aa4febaf Merge pull request #3375 from TeBoring/3.3.x
Merge 3.3.x into master
2017-07-19 06:58:05 -07:00
Jisi Liu
3af881c7e2 Merge master into 3.4.x 2017-07-18 16:26:16 -07:00
Jisi Liu
86975301f1 Update csharp and php descriptor 2017-07-18 15:44:24 -07:00
Bo Yang
6ec0b7e4d1 Merge 3.3.x into master 2017-07-18 11:06:16 -07:00
Matt A
9e745f771b Support PHP generic services (#3269)
* Add php_generic_services option

* Generate PHP generic services

* Respect namespaces for generated PHP services

* Test PHP generated services

* Rename PHP generator service method doc comment function

* Correct phpdoc service method case

* Test namespaced PHP generic services

* Always use the FQCN for PHP generic service input/output

* Add generated_service_test to php test.sh

* Add php service test protos to CI

* Add php service files to php_EXTRA_DIST

* Use Interface suffix for php generic services
2017-07-18 07:45:18 -07:00
Jon Skeet
71f2f0d76c Fix repository URL in C# project file 2017-07-13 14:03:56 +01:00
Jean-Rémy Bancel
727c0dc1fa C#: Implement IReadOnlyDictionary<K,V> in MapField<K,V> 2017-07-12 09:28:43 +01:00
Yilun Chong
7339c25d12 delete backup files 2017-07-05 09:49:11 -07:00
Yilun Chong
cbf7dfb323 fix php failing list and csharp generated proto 2017-07-05 09:48:40 -07:00
Jon Skeet
cdd524a0bd Ensure leaveOpen is true when writing to a buffer
Note that the compatibility tests have had to cahnge as well, to
cope with internal changes. (The test project has access to
internals in the main project.)

Fixes #3209.
2017-07-04 06:42:45 +01:00
Jon Skeet
62d7fe5697 Make Any easier to work with in C#
- Add a TryUnpack method which doesn't throw if the type is wrong
- Make GetTypeName public for easier determination of the message type

Fixes #3294.
2017-07-03 12:16:40 +01:00
Yilun Chong
3adb054bbf add some test proto2 supported, add js proto2 supported, fixed some error 2017-06-30 17:22:32 -07:00
Yilun Chong
a7d5be6a91 change php objc nodejs csharp ruby 2017-06-29 15:04:50 -07:00
Yilun Chong
467c1ccd25 fix csharp conformance test 2017-06-28 15:44:14 -07:00
Yilun Chong
db379e6e69 fix csharp conformance test 2017-06-28 15:32:59 -07:00
Yilun Chong
ff773c1aaf fix csharp 2017-06-28 14:55:30 -07:00
Yilun Chong
cd1dc3f0df add csharp support 2017-06-28 14:51:56 -07:00
Bo Yang
e7bcfc4241 Update version number to 3.3.2 2017-06-21 10:20:34 -07:00
Paul Yang
6f325805c0 Add new file option php_namespace. (#3162)
* Add new file option php_namespace.

Use this option to change the namespace of php generated classes.
Default is empty. When this option is empty, the package name will be
used for determining the namespace.

* Uncomment commented tests

* Revert gdb test change

* Update csharp descriptor.

* Add test for empty php_namespace.
2017-06-05 00:10:18 -07:00
John Brock
95749d5af6 update csharp README and fix .NET 3.5 build error 2017-05-25 20:20:31 +01:00
Jon Skeet
0b07d7eb9e Add IncludeSource in csproj as per review comments 2017-05-24 09:07:33 +01:00
Jon Skeet
f26e8c2ae0 Convert C# projects to MSBuild (csproj) format
This has one important packaging change: the netstandard version now
depends (implicitly) on netstandard1.6.1 rather than on individual
packages. This is the preferred style of dependency, and shouldn't
affect any users - see http://stackoverflow.com/questions/42946951
for details.

The tests are still NUnit, but NUnit doesn't support "dotnet test"
yet; the test project is now an executable using NUnitLite. (When
NUnit supports dotnet test, we can adapt to it.)

Note that the project will now only work in Visual Studio 2017 (and
Visual Studio Code, and from the command line with the .NET Core
1.0.0 SDK); Visual Studio 2015 does *not* support this project file
format.
2017-05-24 09:07:33 +01:00
Feng Xiao
58538ea919 Update version number to 3.3.1 2017-05-08 16:02:08 -07:00
Feng Xiao
80f0c0ac40 Update version number and changelog for 3.3.0 2017-04-05 17:32:17 -07:00
Feng Xiao
32d7830e4b Fix C++ build for down-integration. 2017-03-29 14:52:33 -07:00
Jie Luo
7610f101e8 Merge pull request #2884 from anandolee/master
Add FormatEnumsAsIntegers support for Json Format. Scale JsonFormatter.Settings for multi options.
2017-03-27 11:05:38 -07:00
Jie Luo
689e4bf5f4 Add FormatEnumAsInt support for Json Format. And scale JsonFormatter.Settings to multiple options. 2017-03-24 12:05:52 -07:00
Paul Yang
6b27c1f981 Add file option php_class_prefix (#2849)
This option will be prepended to generated classes of all messages in
the containing file.
2017-03-17 11:08:06 -07:00
Jie Luo
606cb7ed2c There might be duplicated enum values when allow_alias is true. Add PreferredAlias into OriginalNameAttribute to remove the duplication (#2727) 2017-02-28 10:51:19 -08:00
John Brock
17174b54dd Updating README
- Adding more detail on running tests
- Adding info about the status of .NET 3.5 support and how to enable .NET 3.5
2017-02-23 10:51:52 +00:00
John Brock
f83d129555 Upgrading test-related libraries
NUnit 3.4.0 —> 3.6.0
dotnet-test-nunit 3.4.0-alpha-2 —> 3.4.0-beta-3
2017-02-23 10:51:52 +00:00
John Brock
c9b2c8f327 Fixes for .NET 3.5 compatibility
* Changing DOTNET35 framework symbols in preprocessor directives to the default built-in value of NET35.
* Adding extension method StreamExtension.CopyTo for .NET 3.5 because it didn’t exist until .NET 4, and adding associated unit tests.
2017-02-23 10:51:52 +00:00
Jie Luo
3f6f73b796 Merge pull request #2701 from anandolee/master
Add csharp compatibility tests against v3.0.0
2017-02-13 10:54:34 -08:00
Jie Luo
7288689d8c Add csharp compatibility tests against v3.0.0 and run on Travis. 2017-02-10 13:40:16 -08:00
Jie Luo
9f09d1804a Add proto and test files for csharp compatibility tests against v3.0.0.
All the files are copied from 3.0.0 (JosnFormaterTest was deleted)
2017-02-09 16:43:18 -08:00
Jon Skeet
bd29f86804 Fix CopyTo argument validation
Fixes #2669.
2017-02-06 18:24:19 +00:00
Paul Yang
7f3e237071 Merge 3.2.x branch into master (#2648)
* Down-integrate internal changes to github.

* Update conformance test failure list.

* Explicitly import used class in nano test to avoid random test fail.

* Update _GNUC_VER to use the correct implementation of atomic operation
on Mac.

* maps_test.js: check whether Symbol is defined before using it (#2524)

Symbol is not yet available on older versions of Node.js and so this
test fails with them. This change just directly checks whether Symbol is
available before we try to use it.

* Added well_known_types_embed.cc to CLEANFILES so that it gets cleaned up

* Updated Makefile.am to fix out-of-tree builds

* Added Bazel genrule for generating well_known_types_embed.cc

In pull request #2517 I made this change for the CMake and autotools
builds but forgot to do it for the Bazel build.

* Update _GNUC_VER to use the correct implementation of atomic operation on Mac.

* Add new js file in extra dist.

* Bump version number to 3.2.0

* Fixed issue with autoloading - Invalid paths (#2538)

* PHP fix int64 decoding (#2516)

* fix int64 decoding

* fix int64 decoding + tests

* Fix int64 decoding on 32-bit machines.

* Fix warning in compiler/js/embed.cc

embed.cc: In function ‘std::string CEscape(const string&)’:
embed.cc:51:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < str.size(); ++i) {
                                ^

* Fix include in auto-generated well_known_types_embed.cc

Restore include style fix (e3da722) that has been trampled by
auto-generation of well_known_types_embed.cc

* Fixed cross compilations with the Autotools build

Pull request #2517 caused cross compilations to start failing, because
the js_embed binary was being built to run on the target platform
instead of on the build machine. This change updates the Autotools build
to use the AX_PROG_CXX_FOR_BUILD macro to find a suitable compiler for
the build machine and always use that when building js_embed.

* Minor fix for autocreated object repeated fields and maps.

- If setting/clearing a repeated field/map that was objects, check the class
  before checking the autocreator.
- Just to be paranoid, don’t mutate within copy/mutableCopy for the autocreated
  classes to ensure there is less chance of issues if someone does something
  really crazy threading wise.
- Some more tests for the internal AutocreatedArray/AutocreatedDictionary
  classes to ensure things are working as expected.
- Add Xcode 8.2 to the full_mac_build.sh supported list.

* Fix generation of extending nested messages in JavaScript (#2439)

* Fix generation of extending nested messages in JavaScript

* Added missing test8.proto to build

* Fix generated code when there is no namespace but there is enum definition.

* Decoding unknown field should succeed.

* Add embed.cc in src/Makefile.am to fix dist check.

* Fixed "make distcheck" for the Autotools build

To make the test pass I needed to fix out-of-tree builds and update
EXTRA_DIST and CLEANFILES.

* Remove redundent embed.cc from src/Makefile.am

* Update version number to 3.2.0-rc.1 (#2578)

* Change protoc-artifacts version to 3.2.0-rc.1

* Update version number to 3.2.0rc2

* Update change logs for 3.2.0 release.

* Update php README

* Update upb, fixes some bugs (including a hash table problem). (#2611)

* Update upb, fixes some bugs (including a hash table problem).

* Ruby: added a test for the previous hash table corruption.

Verified that this triggers the bug in the currently released
version.

* Ruby: bugfix for SEGV.

* Ruby: removed old code for dup'ing defs.

* Reverting deployment target to 7.0 (#2618)

The Protobuf library doesn’t require the 7.1 deployment target so
reverting it back to 7.0

* Fix typo that breaks builds on big-endian (#2632)

* Bump version number to 3.2.0
2017-01-31 09:17:32 -08:00
Jon Skeet
afc59ab55a C#: Implement IReadOnlyList<T> in RepeatedField<T>
We explicitly don't do this when targeting .NET 3.5, where the
interface doesn't exist.

No implementation is required, as we're already implementing
everything we need for IList<T>.
2017-01-30 18:58:56 +00:00
Jie Luo
ccb76fff44 Add Oneof custom options test 2017-01-27 11:52:32 -08:00
Jon Skeet
047575f20c Support custom options in C#
This consists of:
- Changing the codegen for the fixed set of options protos, to parse unknown fields instead of skipping them
- Add a new CustomOptions type in the C# support library
- Expose CustomOptions properties from the immutable proto wrappers in the support library

Only single-value options are currently supported, and fetching options values requires getting the type right
and knowing the field number. Both of these can be addressed at a later time.

Fixes #2143, at least as a first pass.
2017-01-19 06:46:04 +00:00
Jon Skeet
fb71df9f0b Add ByteString.FromStream and ByteString.FromStreamAsync in C#
Fixes #2088.

We now have separate tests for netcoreapp and net45 to test the two branches here.
(netstandard10 doesn't have MemoryStream.GetBuffer)

Although most of this library doesn't have any async functionality,
this feels like a natural place to locally add it.
2017-01-10 13:05:27 +00:00
Jon Skeet
e76d91a9d1 Add global.json file to pick dotnet core SDK version. 2017-01-10 13:05:27 +00:00
Jon Skeet
b18bc9b944 Give C# ByteString a sensible GetHashCode implementation.
Fixes #2511.
2016-12-16 12:04:40 +00:00
Jan Tattermusch
9d709f446f Merge pull request #2487 from jtattermusch/csharp_leading_whitespace
remove leading whitespace in C# xml comments
2016-12-13 13:42:23 +01:00
Jan Tattermusch
fda9049ead remove leading whitespace in C# xml comments 2016-12-12 12:41:26 +01:00
Michael Darakananda
bb77cbf05a update descriptor.proto's go_package
This change has already been made in google's repo.
Replicating the change here to unblock work on genproto.
2016-12-07 18:15:17 +11:00
Joshua Haberman
f1ce60e7b4 Factored Conformance and Benchmark test messages into shared test schema. (#1971)
* Factored Conformance test messages into shared test schema.

* Updated benchmarks to use new proto3 message locations.

* Fixed include path.

* Conformance: fixed include of Python test messages.

* Make maven in Rakefile use --batch-mode.

* Revert changes to benchmarks.

On second thought I think a separate schema for
CPU benchmarking makes sense.

* Try regenerating C# protos for new test protos.

* Removed benchmark messages from test proto.

* Added Jon Skeet's fixes for C#.

* Removed duplicate/old test messages C# file.

* C# fixes for test schema move.

* Fixed C# to use the correct TestAllTypes message.

* Fixes for Objective C test schema move.

* Added missing EXTRA_DIST file.
2016-12-03 11:51:25 -05:00
Thomas Van Lenten
f813bd9f8f Add a swift_prefix file option.
Swift generators should default to CamelCasing the proto package and prefixing
symbols with that, but this option allows developers to override that behavior
with something custom if they desire.

Fixes https://github.com/google/protobuf/issues/1833
2016-11-30 13:48:16 -05:00
Adam Cozzette
db35fe735a Add a "u" suffix to tag numbers in generated code
This seems to be necessary to prevent warnings in some compiler
configurations, particularly for tag numbers that are too large to fit
in a signed 32-bit int.
2016-11-22 16:23:55 -08:00
Julien Brianceau
3c0e0ce2b0 Fix csharp/src/Google.Protobuf.Test/project.json
This change fixes the following Chromium presubmit error:

  third_party/protobuf/csharp/src/Google.Protobuf.Test/project.json could
  not be parsed: Expecting property name: line 25 column 3 (char 482)
2016-11-14 22:32:15 +01:00
Msp
089aaa996a Fix message for InvalidProtocolBufferException 2016-11-04 23:54:34 +05:30
Jon Skeet
50a37e0135 Change JSON field name formatting
This affects cases with leading capital letters.

This breaks compatibility with previous C# releases, but
fixes compatibility with other implementations.

See #2278 for details.
2016-11-03 18:05:59 +00:00
Bo Yang
89db7ce02b Add script to build Google.Protobuf.Tools for csharp. 2016-10-10 11:44:21 -07:00
Bo Yang
e62d1f13f2 Add back removed descriptor field. 2016-10-10 11:44:21 -07:00
Feng Xiao
f933d10fbe Update version number.
[skip ci]

Change-Id: I1ba6f6372a08b5796570851336e1a548602f60da
2016-10-10 11:44:21 -07:00
Bo Yang
93007e15ff Bump library veriosn to 3.1 2016-10-10 11:43:48 -07:00
Bo Yang
15f4db6cb1 Bump version number to 3.1.0-alpha-1. 2016-10-10 11:24:31 -07:00
Jan Tattermusch
da7c026ce1 Update README.md 2016-09-22 11:07:37 +02:00
Jisi Liu
58860c021f Merge remote-tracking branch 'origin/3.0.x' into merge 2016-09-14 09:37:48 -07:00
Guillaume Turri
9b8da104c1 Rm check on dependency in the C# reflection API (#2051)
This check adds a few constraints on the way to build a project when we have
a proto file which imports another one. In particular, on projects which
build both C# and Java, it's easy to end up with exceptions like

    Expected: included.proto but was src/main/protobuf/included.proto

A user may work around this issue, but it may add unnecessary constraints
on the layout of the project.

According to f3504cf3b1 (diff-ecb0b909ed572381a1c8d1994f09a948R309)
it has already been considered to get rid of this check, for
similar considerations, and because it doesn't exist in the Java code
2016-09-05 09:29:03 +01:00
Jisi Liu
6e11540b32 Bump version number to 3.0.2 2016-09-02 11:57:49 -07:00
Thomas Van Lenten
e389165586 Add more JSON tests around underscores (#1963)
Add more JSON tests around underscores
2016-08-16 09:02:27 -04:00
Jon Skeet
f9d93f358d Regenerate conformance files to include extra oneof fields.
This should fix the failures in the conformance tests - although
it highlights the problem that we need to do this when changing
the conformance.proto file...
2016-08-15 16:45:27 +01:00
Jisi Liu
169d0ca43c Merge pull request #1893 from google/3.0.0-GA
Merge 3.0.0-GA into master
2016-07-29 14:27:53 -07:00
Jon Skeet
4e169bf0e5 Bring C#'s ToPascalCase method in line with C++.
(This still doesn't fix the conformance tests, but at least
we're now consistent with the C++ code.)
2016-07-27 10:51:12 -07:00
Jon Skeet
a8aae8989c Bring C#'s ToPascalCase method in line with C++.
(This still doesn't fix the conformance tests, but at least
we're now consistent with the C++ code.)
2016-07-27 10:49:13 +01:00
Jisi Liu
fb7a7c5f1f Bump version number for GA 2016-07-25 12:07:56 -07:00
Jon Skeet
b5ce5251fd Move to dotnet cli for building, and .NET Core (netstandard1.0) as target platform (#1727)
This also updates the version number to 3.0.0-beta4
2016-07-14 22:16:35 +01:00
Jon Skeet
5e0de1ebee Remove the overload for Add(RepeatedField<T>)
We now just perform the optimization within AddRange itself.

This is a breaking change in terms of "drop in the DLL", but is
source compatible, which should be fine.
2016-07-14 22:14:51 +01:00
Jon Skeet
2ee1e52380 Optimize AddRange for sequences implementing ICollection
(Also fix a few more C# 6-isms.)
2016-07-14 22:14:51 +01:00
Jon Skeet
b053b9211b Implement RepeatedField.AddRange.
This fixes issue #1730.
2016-07-14 22:14:51 +01:00
Jon Skeet
d9334ea8d9 Improve exception throwing implementation in collections 2016-07-14 22:14:51 +01:00
Feng Xiao
c2ebdec355 Update version number in AssemblyInfo.cs. 2016-07-14 10:46:24 -07:00
Feng Xiao
932f94e16e Update version number to 3.0.0-beta-4 2016-07-13 16:08:47 -07:00
Feng Xiao
443eb27c7c Update generated files. 2016-07-13 15:37:29 -07:00
Jos Hickson
790e6afb72 Fixed out-of-date documentation for CodedInputStream.ReadEnum. (#1581) 2016-07-10 21:31:35 +01:00
Jon Skeet
3560cc9ede Merge pull request #1702 from lukebakken/csharp-nuget-doc-update
Modify csharp README since there are now two NuGet packages
2016-07-10 21:30:31 +01:00
Jon Skeet
3df146e198 Remove unnecessary reflection call
This is the only call to TypeExtensions.IsValueType, so we can remove
that method, making the whole type conditionally compiled out for .NET 3.5
2016-07-08 18:21:25 +01:00
Jon Skeet
c53484539c Changes to generated code from previous commit 2016-07-04 08:22:18 +01:00
detlevschwabe
dc0aeaa903 Adding conditional compiler symbol to support .NET 3.5 (#1713)
* Adding condition compiler symbol to support .NET 3.5
2016-06-28 06:31:42 +01:00
Jon Skeet
0421238cc1 Expose JsonFormatter.WriteValue.
This isn't useful to most users, but can be handy in advanced use cases,
as requested in #1465.
2016-06-23 12:31:10 +01:00
Luke Bakken
80694669e4 Modify csharp README since there are now two NuGet packages 2016-06-22 07:39:05 -07:00
Jon Skeet
e3f6e2b870 Remove ordering guarantees in the MapField documentation
This doesn't currently change the ordering in the implementation, but allows us to do so in the future.
We also need to change
https://developers.google.com/protocol-buffers/docs/reference/csharp-generated#singular
which states "Finally, unlike Dictionary<TKey, TValue>, MapField<TKey, TValue> preserves insertion order of entries."
(We can just remove that sentence, I think.)
2016-06-21 07:22:48 +01:00
Jisi Liu
c8be6ee00c Merge pull request #1542 from google/beta-3
Merge Beta 3 release branch into master
2016-05-16 13:46:16 -07:00
Jisi Liu
017d390d65 Fix csharp version 2016-05-11 15:09:43 -07:00
Jon Skeet
7cc9cb407b Move test for standalone BoolValue to JsonParserTest
Also added a standalone formatter test, for confidence.
Have validated that undoing the change in 835fb947 breaks the tests
(i.e. we are still testing that the change is required).
2016-05-11 18:07:03 +01:00
Jos Hickson
835fb947cc Fixed parsing of BoolValue. 2016-05-11 15:36:02 +01:00
Jisi Liu
5dea2017db Update version numbers for other languages 2016-05-10 15:43:39 -07:00
Jon Skeet
5b5e369b18 Merge pull request #1471 from jskeet/any-host
Allow custom type URL prefixes in Any.Pack
2016-05-06 06:29:03 +01:00
Jon Skeet
61307b86f5 Allow custom type URL prefixes in Any.Pack
(And likewise ignore the prefix in unpack.)

Fixes issue #1459.
2016-04-29 10:20:03 +01:00
Jisi Liu
12fdeb9b41 Merge branch 'master' of github.com:google/protobuf 2016-04-28 14:43:08 -07:00
Jon Skeet
c588ac42a2 Regenerate well-known types for C#
(There are documentation changes and new fields in descriptor.proto that have resulted
in changes to the serialized descriptor, but no breaking changes for C#.)
2016-04-20 17:19:42 +01:00
Jon Skeet
790f4c8e37 Use the original name in JSON formatting.
(JSON parsing already does the right thing.)
2016-04-20 03:46:02 +01:00
Jon Skeet
84ea2c7a81 Regenerate all C# code and make it compile
JSON tests fail, as we're not using OriginalNameAttribute yet.
2016-04-20 03:46:00 +01:00
Jon Skeet
75626ed79c Add C# codegen changes to enum value names (mostly C++)
Overview of changes:
- A new C#-specific command-line option, legacy_enum_values to revert to the old behavior
- When legacy_enum_values isn't specified, we strip the enum name as a prefix, and PascalCase the value name
- A new attribute within the C# code so that we can always tell the original in-proto name

Regenerating the C# code with legacy_enum_values leads to code which still compiles and works - but
there's more still to do.
2016-04-20 03:45:59 +01:00
Jon Skeet
46e088e2b6 Remove duplicate test cases.
(NCrunch noticed these.)
2016-04-01 17:18:45 +01:00
Jan Tattermusch
099ff1ea14 Merge pull request #1369 from jskeet/tools-nuspec
Introduce a new nuget package, Google.Protobuf.Tools, basically to contain protoc on multiple platforms.
2016-03-31 17:44:40 -07:00
Jon Skeet
dfd47600d1 Remove duplicate line 2016-03-31 10:46:55 +01:00
Jon Skeet
ca0461c186 Introduce a new nuget package, Google.Protobuf.Tools, basically to contain protoc on multiple platforms.
I've moved both protoc.exe and the proto files out of Google.Protobuf.
The .proto files aren't a slam-dunk, but it feels like they belong with protoc as you'd *use* them with protoc.
It's not clear to me whether we really need both an x86 and x64 version of protoc.exe, as x86 would work on 64-bit Windows anyway. Discuss :)
2016-03-31 07:12:17 +01:00
Jon Skeet
71e8dca083 Refactoring of FieldDescriptor
This makes no externally visible behavioral changes. Internally and non-behaviorally:

- We use a field (compiler-generated) to store the JsonName to avoid recomputing it repeatedly
- The documentation for JsonName is updated to reflect the meaning better
- Readonly autoprops and expression-bodied properties used where possible
2016-03-30 09:42:37 +01:00
alien
6f8dd2115b Code review fixes 2016-03-29 20:56:32 +03:00
alien
0d32ab37fa csharp: add support for the json_name option
Conflicts:
	csharp/src/Google.Protobuf/JsonFormatter.cs
2016-03-18 22:59:50 +03:00
avgweb
ad2d775e1b Replace StringBuilder with TextWriter in JsonFormatter 2016-03-06 17:50:02 -08:00
Jon Skeet
f222a9a5e6 Fix copy/paste typo in CodedInputStreamTest 2016-03-01 07:30:40 +00:00
Jon Skeet
c0cf71bec9 Implement IDisposable for CodedInputStream and CodedOutputStream
This fixes issue #679 and issue #1282.
(The .gitignore change is just around ncrunch; I can put it in a separate PR if you really want.)
2016-02-29 11:51:56 +00:00
Jon Skeet
42371463de Require VS2015 in the solution file 2016-02-22 13:04:01 +00:00
Jan Tattermusch
c003abb40d Merge pull request #1240 from jskeet/validate_group
Validate that end-group tags match their corresponding start-group tags
2016-02-18 14:38:06 -08:00
Jon Skeet
abc09f795e Merge pull request #1239 from jskeet/call_generate_protos
Generate C# code whenever descriptor.proto changes
2016-02-18 06:45:51 +00:00
Jon Skeet
0262e04dbb Add more tests around merging wrappers
This was in an attempt to fix the wrapper handling corner case, but it's really fiddly.
2016-02-15 14:17:02 +00:00
Jon Skeet
9bdc848832 Validate that end-group tags match their corresponding start-group tags
This detects:
- An end-group tag with the wrong field number (doesn't match the start-group field)
- An end-group tag with no preceding start-group tag

Fixes issue #688.
2016-02-15 11:58:01 +00:00
Jon Skeet
957e877d52 Generate C# code whenever descriptor.proto changes
This is a start to fixing issue #1212. It won't help for test protos,
conformance etc, but it will definitely be better than nothing, and
would have highlighted a change in descriptor.proto which broken C#
earlier.
2016-02-15 10:33:13 +00:00
Jan Tattermusch
2d3f79f7d6 Merge pull request #1218 from jskeet/nuspec-dependencies
nuspec dependency fixes
2016-02-11 10:38:35 -08:00
Jan Tattermusch
95c4100230 Add a link 2016-02-10 08:16:45 -08:00
Jan Tattermusch
d40e3a1623 Use checked-in key to build ReleaseSigned 2016-02-09 15:59:05 -08:00
Jan Tattermusch
82f210cbac add private key for strong name assemblies 2016-02-09 15:53:16 -08:00
Jon Skeet
f1c5754f0f nuspec dependency fixes
Explicitly don't add any dependencies for "old" platforms, to avoid unnecessary
dependencies in those cases.

Fixes issue #1203.
2016-02-08 11:25:07 +00:00
Jon Skeet
045b528d4a Generated code changes from previous commit 2016-02-04 15:02:59 +00:00
Jon Skeet
7762f163a4 Rename Preconditions to ProtoPreconditions
(Generated code changes in next commit.)
2016-02-04 14:50:43 +00:00
Jon Skeet
b6159965ec Generated code for GeneratedCodeInfo change 2016-02-04 07:08:55 +00:00
Jon Skeet
a3ea9d1203 Rename GeneratedCodeInfo to GeneratedClrTypeInfo
Recently, descriptor.proto gained a GeneratedCodeInfo message, which means the generated code conflicts with our type.
Unfortunately this affects codegen as well, although this is a part of the public API which is very unlikely to affect hand-written code.

Generated code changes in next commit.
2016-02-04 07:05:49 +00:00
Jon Skeet
0809de8e9f Clarify readme 2016-02-03 09:45:48 +00:00
Jan Tattermusch
b13874d59e Merge pull request #1158 from jskeet/nonnormalized-tostring
Ensure that FieldMask, Timestamp and Duration ToString() calls don't throw
2016-01-26 08:43:45 -08:00
Jon Skeet
3878d84662 Fix mistakes in highest-representable float64 integers 2016-01-21 10:49:57 +00:00
Jon Skeet
dd43dcca8c Ensure that FieldMask, Timestamp and Duration ToString() calls don't throw
The usage of ICustomDiagnosticMessage here is non-essential - ToDiagnosticString
doesn't actually get called by ToString() in this case, due to JsonFormatter code. It was
intended to make it clearer that it *did* have a custom format... but then arguably I should
do the same for Value, Struct, Any etc.

Moving some of the code out of JsonFormatter and into Duration/Timestamp/FieldMask likewise
feels somewhat nice, somewhat nasty... basically there are JSON-specific bits of formatting, but
also domain-specific bits of computation. <sigh>

Thoughts welcome.
2016-01-20 18:43:00 +00:00
Jan Tattermusch
8c5260b21b Merge pull request #1096 from jskeet/custom-to-string
Introduce ICustomDiagnosticMessage to allow for custom string formatting
2016-01-19 19:38:16 -08:00
Jon Skeet
030c268489 Fix broken test 2016-01-15 17:34:10 +00:00
Jon Skeet
b1ea15f7a5 Make sure that
"valueField": null

is parsed appropriately, i.e. that it remembers that the field is set.
2016-01-15 14:18:16 +00:00
Jon Skeet
8866d6a80e Reject JSON containing the same oneof field twice 2016-01-15 13:54:17 +00:00
Jon Skeet
52db5139c4 Change handling of unknown enums: we now write out the value as a number. 2016-01-15 13:45:53 +00:00
Jon Skeet
f437b67f60 Extra strictness for FieldMask conversion 2016-01-15 12:02:07 +00:00
Jon Skeet
022a9b2675 Allow the original field name (rather than camel-cased) when parsing JSON 2016-01-15 11:39:54 +00:00
Jon Skeet
1fc485928f Fixes to JSON timestamp/duration representations 2016-01-15 11:39:27 +00:00
Jon Skeet
c74676f070 Report serialization errors in conformance tests 2016-01-15 10:55:57 +00:00
Jon Skeet
888e71bdfc Prohibit null values in repeated and map fields in JSON 2016-01-15 10:55:36 +00:00
Jon Skeet
1a34ac03be Throw a better exception when invalid base64 is detected in JSON 2016-01-15 10:43:06 +00:00
Jon Skeet
730c38ad8c Support (and test) numeric enum parsing in JSON 2016-01-15 10:41:56 +00:00
Jon Skeet
f262611ff6 Fix handling of repeated wrappers
Previously we were incorrectly packing wrapper types.
This also refactors FieldCodec a bit as well, using more C# 6-ness.
2016-01-15 10:13:56 +00:00
Jon Skeet
f2fe50bfc5 JSON conformance test fixes
- Spot an Any without a type URL
- In the conformance test runner, catch exceptions due to generally-invalid JSON
2016-01-13 14:05:06 +00:00
Jon Skeet
5dba7d7b4c Introduce ICustomDiagnosticMessage to allow for custom string formatting
This fixes issue #933, effectively.
2016-01-13 10:58:49 +00:00
Jan Tattermusch
73c003c309 Merge pull request #1089 from jskeet/map-null
Prohibit null values in maps
2016-01-12 20:55:47 -08:00
Dongjoon Hyun
7b08d49e9d Fix typos in README.md/CHANGES.txt 2016-01-11 14:52:01 -08:00
Jon Skeet
9e4f354f14 Prohibit null values in map fields
On deserialization, missing values for message types
are replaced with a "default" message.
2016-01-11 09:34:43 +00:00
Jan Tattermusch
6d1d415133 Merge pull request #1098 from jskeet/wkt-json
Ensure all formatted well-known-type values are valid JSON
2016-01-08 16:58:47 -08:00
Jan Tattermusch
698f61688c Merge pull request #1088 from jskeet/codec-pruning
Remove unused method in FieldCodec.
2016-01-08 16:50:05 -08:00
Jon Skeet
b4a58173f2 Ensure all formatted well-known-type values are valid JSON
This involves quoting timestamp/duration/field-mask values, even when they're not in fields.
It's better for consistency.

Fixes issue #1097.
2016-01-06 12:05:31 +00:00
Jon Skeet
aa431a0481 Improve number handling in JSON parsing
- Tighten up on Infinity/NaN handling in terms of whitespace handling (and test casing)
- Validate that values are genuinely integers when they've been parsed from a JSON number (ignoring the fact that 1.0000000000000000001 == 1 as a double...)
- Allow exponents and decimal points in string representations
2016-01-06 11:16:10 +00:00
Jon Skeet
9f10c4576a Remove unused method in FieldCodec.
(The method was last used a very long time ago, if ever.)
2016-01-05 14:36:14 +00:00
Jon Skeet
d49b9c81ec Fix C# source generation shell script and remove out of date notes
The conformance tests now use types which are part of src/google/protobuf, so we need to include src in the proto path.
The notes around "fix-ups" have been out of date for some time now.
2016-01-04 14:02:00 +00:00
Jan Tattermusch
00ace95ae3 add reference generator dependency 2015-12-17 09:37:56 -08:00
Jon Skeet
afbc89a263 Merge pull request #1049 from jskeet/any-format
Handle Any formatting for diagnostic purposes
2015-12-17 13:10:16 +00:00
Jan Tattermusch
33106681a5 Merge pull request #1051 from jtattermusch/support_coreclr
Make nuget package support coreCLR
2015-12-16 13:14:02 -08:00
Jan Tattermusch
52139f9fde make nuget package support CoreCLR 2015-12-16 09:21:09 -08:00
Jon Skeet
a4dc5968b1 Add JSON parsing to conformance tests. 2015-12-16 08:58:58 +00:00
Jon Skeet
adee6fe332 Generated code changes from previous commit. 2015-12-15 09:24:04 +00:00
Jon Skeet
aabc6c411a Make ToString() valid without a type registry
This addresses issue #1008, by creating a JsonFormatter which is private and only different
to JsonFormatter.Default in terms of reference equality.

Other plausible designs:

- The same, but expose the diagnostic-only formatter
- Add something to settings to say "I don't have a type registry at all"
- Change the behaviour of JsonFormatter.Default (bad idea IMO, as we really *don't* want the result of this used as regular JSON to be parsed)

Note that just trying to find a separate fix to issue #933 and using that to override Any.ToString() differently wouldn't work for messages that *contain* an Any.

Generated code changes follow in the next commit.
2015-12-15 09:23:38 +00:00
Jon Skeet
3de2fced6b Handle JSON parsing for Any.
This required a rework of the tokenizer to allow for a "replaying" tokenizer, basically in case the @type value comes after the data itself. This rework is nice in some ways (all the pushback and object depth logic in one place) but is a little fragile in terms of token push-back when using the replay tokenizer. It'll be fine for the scenario we need it for, but we should be careful...
2015-12-02 07:54:34 +00:00
Jon Skeet
567579b505 JSON formatting for Any. 2015-12-02 07:26:55 +00:00
Jon Skeet
a2667aafd8 Generated code changes for previous commit (basically InternalBuildGeneratedFileFrom => FromGeneratedCode) 2015-11-22 16:30:36 +00:00
Jon Skeet
72ec33676f Tidy up reflection in advance of attempting to implement DynamicMessage.
There are corner cases where MessageDescriptor.{ClrType,Parser} will return null, and these are now documented. However, normally they *should* be implemented, even for descriptors of for dynamic messages. Ditto FieldDescriptor.Accessor.
We'll still need a fair amount of work to implement dynamic messages, but this change means that the public API will be remain intact.

Additionally, this change starts making use of C# 6 features in the files that it touches. This is far from exhaustive, and later PRs will have more.

Generated code changes coming in the next commit.
2015-11-22 16:25:44 +00:00
Jon Skeet
f7e43c6f80 Added the type registry in advance of implementing Any support.
Biting off just this bit first as I don't need the changes from a previous PR for this part.
2015-11-21 03:34:58 +00:00
Jan Tattermusch
956a770adc Merge pull request #988 from gabikliot/CSharp-SampleUsage-Big-Fix
Fixed a bug in CSharp SampleUsage.
2015-11-19 20:02:18 -08:00
Gabriel Kliot
bdec990703 Removed redundant comment. 2015-11-19 08:05:05 -08:00
Jon Skeet
360feda5f7 Finished an implementation comment 2015-11-19 09:40:49 +00:00
Jon Skeet
eadd4caa09 Generated code from previous commit. 2015-11-19 09:38:49 +00:00
Jon Skeet
2a15051a1e Introduce a Parser property into MessageDescriptor, and populate it from generated types.
Generated code coming in next commit - in a subsequent PR I want to do a bit of renaming and redocumenting around this, in anticipation of DynamicMessage.
2015-11-19 08:50:28 +00:00
Gabriel Kliot
09d03dfc7e Fixed a bug in CSharp SampleUsage. 2015-11-18 23:09:05 -08:00
Jon Skeet
284bb452e4 Generated code changes and manual changes for previous commit. 2015-11-09 09:22:45 +00:00
Jon Skeet
cff900e8f9 Generated code for previous commit. 2015-11-06 18:38:31 +00:00
Jan Tattermusch
ffe25c76ea Merge pull request #941 from jskeet/recursion-limit
Add recursion limit handling to JSON parsing.
2015-11-05 18:41:05 -08:00