|
|
|
@ -73,17 +73,16 @@ namespace Google.Protobuf.Reflection |
|
|
|
|
/// <summary> |
|
|
|
|
/// The (possibly empty) set of custom options for this method. |
|
|
|
|
/// </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<MethodOptions, 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> |
|
|
|
@ -93,7 +92,6 @@ namespace Google.Protobuf.Reflection |
|
|
|
|
{ |
|
|
|
|
return Proto.Options.GetExtension(extension).Clone(); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file, |
|
|
|
|
ServiceDescriptor parent, int index) |
|
|
|
|