From: Bryan Duxbury Date: Mon, 28 Mar 2011 14:52:25 +0000 (+0000) Subject: THRIFT-1120. csharp: proto.WriteListEnd being called in the wrong place X-Git-Tag: 0.7.0~131 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=137fea686ee77a6f61e60f8201459df9c6038ab9;p=common%2Fthrift.git THRIFT-1120. csharp: proto.WriteListEnd being called in the wrong place Patch: guoyunfeng git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1086260 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc index 45ed646b..93a39f97 100644 --- a/compiler/cpp/src/generate/t_csharp_generator.cc +++ b/compiler/cpp/src/generate/t_csharp_generator.cc @@ -1488,6 +1488,8 @@ void t_csharp_generator::generate_serialize_container(ofstream& out, t_type* tty generate_serialize_list_element(out, (t_list*)ttype, iter); } + scope_down(out); + if (ttype->is_map()) { indent(out) << "oprot.WriteMapEnd();" << endl; } else if (ttype->is_set()) { @@ -1497,7 +1499,6 @@ void t_csharp_generator::generate_serialize_container(ofstream& out, t_type* tty } scope_down(out); - scope_down(out); } void t_csharp_generator::generate_serialize_map_element(ofstream& out, t_map* tmap, string iter, string map) {