Commit afc59ab5 authored by Jon Skeet's avatar Jon Skeet Committed by Jon Skeet

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>.
parent 87e4976b
...@@ -47,6 +47,9 @@ namespace Google.Protobuf.Collections ...@@ -47,6 +47,9 @@ namespace Google.Protobuf.Collections
/// </remarks> /// </remarks>
/// <typeparam name="T">The element type of the repeated field.</typeparam> /// <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>> 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 static readonly T[] EmptyArray = new T[0];
private const int MinArraySize = 8; private const int MinArraySize = 8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment