aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf/Collections
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2017-01-30 17:34:32 +0000
committerGravatar Jon Skeet <skeet@pobox.com>2017-01-30 18:58:56 +0000
commitafc59ab55abe148af5aa4bd48c34d3d61364f06e (patch)
treeb1287250969951e3c7f852197e8473133daba748 /csharp/src/Google.Protobuf/Collections
parent87e4976ba4bf6782945dcf3e821caaebdc2744ee (diff)
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>.
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections')
-rw-r--r--csharp/src/Google.Protobuf/Collections/RepeatedField.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
index 7bb56448..9504d7ef 100644
--- a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
+++ b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
@@ -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;