title: Iterate over unknown repeated protobuf field with FieldDescriptor
body: <p>I am trying to write a generalized method to iterate through a protobuf message and basically create an object tree.</p>
  <p>So far I have</p>
  <pre><code>IMessage message = new Message() as IMessage;
  foreach (FieldDescriptor field in message.Descriptor.Fields.InFieldNumberOrder())
              {
                  if (field.FieldType == Google.Protobuf.Reflection.FieldType.Message)
                  {
                      if (field.IsRepeated)
                      {
                          // How to do this?
                      }
                      else
                      {
                          Children.Add(new MessageNode(field, (IMessage)field.Accessor.GetValue(message)));
                      }
                  }
                  else
                  {
                      Children.Add(new FieldNode(field, message));
                  }
             }
  </code></pre>
  <p>Works fine except for repeated fields (and probably the same problem will crop up for Map fields).</p>
  <p>If I do <code>field.Accessor.GetValue(message)</code> for the repeated field, I get an <code>object[RepeatedField&lt;T&gt;]</code> with <code>T</code> being some nested message. However, I cannot iterate over something of type <code>object</code>.
  I tried casting object to <code>RepeatedField&lt;IMessage&gt;</code> but this just returns 0.</p>
  <p>Is there any way to iterate over a repeated field without knowing the type inside? I would just need an <code>IMessage</code> pointer to the objects inside, from there I can work with the <code>Descriptor</code> in <code>IMessage</code>.</p>