Commit 43619bb6 authored by Sydney Acksman's avatar Sydney Acksman

Uncomment option code in OneofDescriptor

parent 03872044
...@@ -105,17 +105,16 @@ namespace Google.Protobuf.Reflection ...@@ -105,17 +105,16 @@ namespace Google.Protobuf.Reflection
/// <summary> /// <summary>
/// The (possibly empty) set of custom options for this oneof. /// The (possibly empty) set of custom options for this oneof.
/// </summary> /// </summary>
//[Obsolete("CustomOptions are obsolete. Use GetOption")] [Obsolete("CustomOptions are obsolete. Use GetOption")]
public CustomOptions CustomOptions => new CustomOptions(proto.Options._extensions?.ValuesByNumber); public CustomOptions CustomOptions => new CustomOptions(proto.Options._extensions?.ValuesByNumber);
/* // uncomment this in the full proto2 support PR
/// <summary> /// <summary>
/// Gets a single value enum option for this descriptor /// Gets a single value enum option for this descriptor
/// </summary> /// </summary>
public T GetOption<T>(Extension<OneofOptions, T> extension) public T GetOption<T>(Extension<OneofOptions, T> extension)
{ {
var value = proto.Options.GetExtension(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> /// <summary>
...@@ -125,7 +124,6 @@ namespace Google.Protobuf.Reflection ...@@ -125,7 +124,6 @@ namespace Google.Protobuf.Reflection
{ {
return proto.Options.GetExtension(extension).Clone(); return proto.Options.GetExtension(extension).Clone();
} }
*/
internal void CrossLink() internal void CrossLink()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment