public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { RequestId = input.ReadString(); break; } case 34: { global::TestGrpc.Messages.InvocationRequest subBuilder = new global::TestGrpc.Messages.InvocationRequest(); if (contentCase_ == ContentOneofCase.InvocationRequest) { subBuilder.MergeFrom(InvocationRequest); } input.ReadMessage(subBuilder); InvocationRequest = subBuilder; break; } case 42: { global::TestGrpc.Messages.InvocationResponse subBuilder = new global::TestGrpc.Messages.InvocationResponse(); if (contentCase_ == ContentOneofCase.InvocationResponse) { subBuilder.MergeFrom(InvocationResponse); } input.ReadMessage(subBuilder); InvocationResponse = subBuilder; break; } case 162: { global::TestGrpc.Messages.StartStream subBuilder = new global::TestGrpc.Messages.StartStream(); if (contentCase_ == ContentOneofCase.StartStream) { subBuilder.MergeFrom(StartStream); } input.ReadMessage(subBuilder); StartStream = subBuilder; break; } } } }
public void MergeFrom(StreamingMessage other) { if (other == null) { return; } if (other.RequestId.Length != 0) { RequestId = other.RequestId; } switch (other.ContentCase) { case ContentOneofCase.StartStream: if (StartStream == null) { StartStream = new global::TestGrpc.Messages.StartStream(); } StartStream.MergeFrom(other.StartStream); break; case ContentOneofCase.InvocationRequest: if (InvocationRequest == null) { InvocationRequest = new global::TestGrpc.Messages.InvocationRequest(); } InvocationRequest.MergeFrom(other.InvocationRequest); break; case ContentOneofCase.InvocationResponse: if (InvocationResponse == null) { InvocationResponse = new global::TestGrpc.Messages.InvocationResponse(); } InvocationResponse.MergeFrom(other.InvocationResponse); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }