Uncomment option code in OneofDescriptor
diff --git a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs
index 9f3d805..2ff8133 100644
--- a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs
@@ -105,17 +105,16 @@
/// <summary>
/// The (possibly empty) set of custom options for this oneof.
/// </summary>
- //[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
/// <summary>
/// Gets a single value enum option for this descriptor
/// </summary>
public T GetOption<T>(Extension<OneofOptions, T> extension)
{
var value = proto.Options.GetExtension(extension);
- return value is IDeepCloneable<T> clonable ? clonable.Clone() : value;
+ return value is IDeepCloneable<T> ? (value as IDeepCloneable<T>).Clone() : value;
}
/// <summary>
@@ -125,7 +124,6 @@
{
return proto.Options.GetExtension(extension).Clone();
}
- */
internal void CrossLink()
{