diff options
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs index fe5c072c..da570551 100644 --- a/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; namespace Google.Protobuf.Reflection { @@ -58,6 +59,17 @@ namespace Google.Protobuf.Reflection /// </summary> public override string Name { get { return proto.Name; } } + internal override IReadOnlyList<DescriptorBase> GetNestedDescriptorListForField(int fieldNumber) + { + switch (fieldNumber) + { + case ServiceDescriptorProto.MethodFieldNumber: + return (IReadOnlyList<DescriptorBase>) methods; + default: + return null; + } + } + internal ServiceDescriptorProto Proto { get { return proto; } } /// <value> |