Commit Graph

403 Commits

Author SHA1 Message Date
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