From c524ec0121ae70c354fa507e11880a62511d7e20 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jun 2016 16:52:53 -0700 Subject: make Metadata.Entry a class --- src/csharp/Grpc.Core/Metadata.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/csharp/Grpc.Core/Metadata.cs b/src/csharp/Grpc.Core/Metadata.cs index e982fa0c48..f73f720094 100644 --- a/src/csharp/Grpc.Core/Metadata.cs +++ b/src/csharp/Grpc.Core/Metadata.cs @@ -95,6 +95,7 @@ namespace Grpc.Core public void Insert(int index, Metadata.Entry item) { + GrpcPreconditions.CheckNotNull(item); CheckWriteable(); entries.Insert(index, item); } @@ -114,6 +115,7 @@ namespace Grpc.Core set { + GrpcPreconditions.CheckNotNull(value); CheckWriteable(); entries[index] = value; } @@ -121,6 +123,7 @@ namespace Grpc.Core public void Add(Metadata.Entry item) { + GrpcPreconditions.CheckNotNull(item); CheckWriteable(); entries.Add(item); } @@ -187,7 +190,7 @@ namespace Grpc.Core /// /// Metadata entry /// - public struct Entry + public class Entry { private static readonly Encoding Encoding = Encoding.ASCII; private static readonly Regex ValidKeyRegex = new Regex("^[a-z0-9_-]+$"); -- cgit v1.2.3