evgenekov / protobuf-csharp-port

Automatically exported from code.google.com/p/protobuf-csharp-port
Other
0 stars 0 forks source link

Expose repeated extension field as IList #80

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
To iterate over items of a repeated extensions, one needs to do:

for (int i = 0; i < msg.GetExtensionCount(ExtId); i++)
{
  var ext = msg.GetExtension(ExtId, i);
  // use ext.
}

It would be nice if one could write:

foreach (var ext in msg.GetExtensionList(ExtId))
{
  // use ext.
}

Original issue reported on code.google.com by igorga...@gmail.com on 7 Mar 2014 at 4:48

GoogleCodeExporter commented 9 years ago
Yes, that makes sense - I think. I'll have to try to get into the mindset of 
extensions again, but I'll have a look.

Original comment by jonathan.skeet on 7 Mar 2014 at 8:58

GoogleCodeExporter commented 9 years ago
Reviewed today - I think this is still something to look at, although I doubt 
it'll make it in the 2.x line.

Original comment by jonathan.skeet on 15 Feb 2015 at 5:21