Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose repeated extension field as IList #80

Open
GoogleCodeExporter opened this issue Apr 7, 2015 · 2 comments
Open

Expose repeated extension field as IList #80

GoogleCodeExporter opened this issue Apr 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 7 Mar 2014 at 4:48

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant