aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs')
-rw-r--r--csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs
index 89c73a61..4c5457a7 100644
--- a/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs
@@ -72,6 +72,17 @@ namespace Google.Protobuf.Reflection
/// </summary>
public override string Name { get { return proto.Name; } }
+ internal override IReadOnlyList<DescriptorBase> GetNestedDescriptorListForField(int fieldNumber)
+ {
+ switch (fieldNumber)
+ {
+ case EnumDescriptorProto.ValueFieldNumber:
+ return (IReadOnlyList<DescriptorBase>) Values;
+ default:
+ return null;
+ }
+ }
+
/// <summary>
/// The CLR type for this enum. For generated code, this will be a CLR enum type.
/// </summary>