title: Get enum values using reflection google protobuf
body: <p>Support I have an enum in a <code>.proto</code> file such as:</p>
  
  <pre><code>enum My_Types
  {
    my_types_a = 0;
  
    my_types_b = 1;
  
    my_types_c = 2;
  
  }
  </code></pre>
  
  <p>I want to generate an <code>EnumDescriptor</code> so that I can can reference values from this enum, but I must use the <a href="https://developers.google.com/protocol-buffers/docs/reference/csharp/namespace/google/protobuf/reflection" rel="nofollow noreferrer">Google Reflection APIs</a> . When using the protobuf compiled version of the .proto file, I would be able to say <code>My_Types_descriptor()</code> to get the <code>EnumDescriptor</code>, but how would I do this using reflection? The same would apply for <code>EnumValueDescriptor</code> which can describe a particular enum constant. </p>
  
  <p>Given a <a href="https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor#DescriptorPool" rel="nofollow noreferrer">DescriptorPool</a>, how can I use reflection to achieve this? I believe <a href="https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/reflection/enum-descriptor" rel="nofollow noreferrer">this API</a> could help, but I do not know how to use it.</p>