From 43619bb6b23a4a8a889b21de96a12bbcecbb5ac4 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Wed, 20 Mar 2019 23:38:53 -0500 Subject: [PATCH] Uncomment option code in OneofDescriptor --- csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs index 9f3d805d05..2ff8133c3f 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs @@ -105,17 +105,16 @@ namespace Google.Protobuf.Reflection /// /// The (possibly empty) set of custom options for this oneof. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -125,7 +124,6 @@ namespace Google.Protobuf.Reflection { return proto.Options.GetExtension(extension).Clone(); } - */ internal void CrossLink() {