aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-06-07 16:52:53 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-06-07 16:57:29 -0700
commitc524ec0121ae70c354fa507e11880a62511d7e20 (patch)
tree96f2dc6a1593a07b81da6affa3e9198c4475c0f1
parentd30d4e279c4a63effaa6e912fc00bd4ad96054c7 (diff)
make Metadata.Entry a class
-rw-r--r--src/csharp/Grpc.Core/Metadata.cs5
1 files changed, 4 insertions, 1 deletions
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
/// <summary>
/// Metadata entry
/// </summary>
- public struct Entry
+ public class Entry
{
private static readonly Encoding Encoding = Encoding.ASCII;
private static readonly Regex ValidKeyRegex = new Regex("^[a-z0-9_-]+$");