diff options
author | Jon Skeet <jonskeet@google.com> | 2017-01-16 11:23:32 +0000 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2017-01-19 06:46:04 +0000 |
commit | 047575f20cbdee8fb2f88d78a317ffe6133b93e6 (patch) | |
tree | 140117944c03c04c58086d451c09cad7fe2ca919 /csharp/generate_protos.sh | |
parent | eed9951991c6ee7c629b5c4252444c372f7774fd (diff) | |
download | protobuf-047575f20cbdee8fb2f88d78a317ffe6133b93e6.tar.gz protobuf-047575f20cbdee8fb2f88d78a317ffe6133b93e6.tar.bz2 protobuf-047575f20cbdee8fb2f88d78a317ffe6133b93e6.zip |
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.
Diffstat (limited to 'csharp/generate_protos.sh')
-rwxr-xr-x | csharp/generate_protos.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 7cbcf436..d2f47479 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -50,9 +50,10 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test \ src/google/protobuf/unittest_well_known_types.proto # Different base namespace to the protos above -$PROTOC -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test \ +$PROTOC -Isrc -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test \ --csharp_opt=base_namespace=UnitTest.Issues \ - csharp/protos/unittest_issues.proto + csharp/protos/unittest_issues.proto \ + csharp/protos/unittest_custom_options_proto3.proto # Don't specify a base namespace at all; we just want to make sure the # results end up in TestProtos. |