diff options
Diffstat (limited to 'src/csharp/Grpc.Core/Marshaller.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Marshaller.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Marshaller.cs b/src/csharp/Grpc.Core/Marshaller.cs index e73e7b762e..8b1a929074 100644 --- a/src/csharp/Grpc.Core/Marshaller.cs +++ b/src/csharp/Grpc.Core/Marshaller.cs @@ -32,6 +32,7 @@ #endregion using System; +using Grpc.Core.Utils; namespace Grpc.Core { @@ -45,8 +46,8 @@ namespace Grpc.Core public Marshaller(Func<T, byte[]> serializer, Func<byte[], T> deserializer) { - this.serializer = serializer; - this.deserializer = deserializer; + this.serializer = Preconditions.CheckNotNull(serializer); + this.deserializer = Preconditions.CheckNotNull(deserializer); } public Func<T, byte[]> Serializer |