From 047575f20cbdee8fb2f88d78a317ffe6133b93e6 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Mon, 16 Jan 2017 11:23:32 +0000 Subject: 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. --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 6aa7e800..16d96af8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,6 +60,7 @@ csharp_EXTRA_DIST= \ csharp/keys/Google.Protobuf.public.snk \ csharp/keys/Google.Protobuf.snk \ csharp/keys/README.md \ + csharp/protos/unittest_custom_options_proto3.proto \ csharp/protos/unittest_issues.proto \ csharp/src/AddressBook/AddPerson.cs \ csharp/src/AddressBook/Addressbook.cs \ @@ -92,6 +93,7 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs \ csharp/src/Google.Protobuf.Test/JsonParserTest.cs \ csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs \ + csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/TypeRegistryTest.cs \ @@ -101,6 +103,7 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \ csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \ + csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \ @@ -140,6 +143,7 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf/MessageParser.cs \ csharp/src/Google.Protobuf/ProtoPreconditions.cs \ csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs \ + csharp/src/Google.Protobuf/Reflection/CustomOptions.cs \ csharp/src/Google.Protobuf/Reflection/Descriptor.cs \ csharp/src/Google.Protobuf/Reflection/DescriptorBase.cs \ csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs \ -- cgit v1.2.3