dotnet/corefx — pull request #277 by sharwell (2014-12-17 20:57:25+00:00)
Title: Update regular expressions collections to implement IReadOnlyList<T>

Fixes #271

I believe this is the least intrusive path to implementing the requested functionality.

I considered the following items but decided to not include them with this pull request.

* `GroupEnumerator` is internal, so it might be possible to change the type of `GroupEnumerator.Capture` from `Capture` to `Group`. This would make the explicit cast in the generic `Current` property unnecessary.

* I did not update `CaptureCollection` to implement `IReadOnlyDictionary`, primarily because it's a larger change with the addition of the `Keys` and `Values` properties (even if they are explicitly implemented). This should probably be reviewed independently from a straightforward implementation of `IReadOnlyList`.