aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.IntegrationTesting/Payloads.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.IntegrationTesting/Payloads.cs')
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Payloads.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/csharp/Grpc.IntegrationTesting/Payloads.cs b/src/csharp/Grpc.IntegrationTesting/Payloads.cs
index f918b9576b..fca8cda6f6 100644
--- a/src/csharp/Grpc.IntegrationTesting/Payloads.cs
+++ b/src/csharp/Grpc.IntegrationTesting/Payloads.cs
@@ -596,13 +596,22 @@ namespace Grpc.Testing {
}
switch (other.PayloadCase) {
case PayloadOneofCase.BytebufParams:
- BytebufParams = other.BytebufParams;
+ if (BytebufParams == null) {
+ BytebufParams = new global::Grpc.Testing.ByteBufferParams();
+ }
+ BytebufParams.MergeFrom(other.BytebufParams);
break;
case PayloadOneofCase.SimpleParams:
- SimpleParams = other.SimpleParams;
+ if (SimpleParams == null) {
+ SimpleParams = new global::Grpc.Testing.SimpleProtoParams();
+ }
+ SimpleParams.MergeFrom(other.SimpleParams);
break;
case PayloadOneofCase.ComplexParams:
- ComplexParams = other.ComplexParams;
+ if (ComplexParams == null) {
+ ComplexParams = new global::Grpc.Testing.ComplexProtoParams();
+ }
+ ComplexParams.MergeFrom(other.ComplexParams);
break;
}