C#: Implement IReadOnlyList<T> in RepeatedField<T>

We explicitly don't do this when targeting .NET 3.5, where the
interface doesn't exist.

No implementation is required, as we're already implementing
everything we need for IList<T>.
This commit is contained in:
Jon Skeet 2017-01-30 17:34:32 +00:00 committed by Jon Skeet
parent 87e4976ba4
commit afc59ab55a

View file

@ -47,6 +47,9 @@ namespace Google.Protobuf.Collections
/// </remarks>
/// <typeparam name="T">The element type of the repeated field.</typeparam>
public sealed class RepeatedField<T> : IList<T>, IList, IDeepCloneable<RepeatedField<T>>, IEquatable<RepeatedField<T>>
#if !DOTNET35
, IReadOnlyList<T>
#endif
{
private static readonly T[] EmptyArray = new T[0];
private const int MinArraySize = 8;