Public access to the protocols in C# Thrift clients.
authorDavid Reiss <dreiss@apache.org>
Tue, 18 Mar 2008 18:22:14 +0000 (18:22 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 18 Mar 2008 18:22:14 +0000 (18:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665573 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_csharp_generator.cc

index f997630..786fd50 100644 (file)
@@ -710,8 +710,18 @@ void t_csharp_generator::generate_service_client(t_service* tservice) {
     f_service_ <<
       indent() << "protected TProtocol iprot_;" << endl <<
       indent() << "protected TProtocol oprot_;" << endl <<
-      endl <<
       indent() << "protected int seqid_;" << endl << endl;
+
+    f_service_ << indent() << "public TProtocol InputProtocol" << endl;
+    scope_up(f_service_);
+    indent(f_service_) << "get { return iprot_; }" << endl;
+    scope_down(f_service_);
+
+    f_service_ << indent() << "public TProtocol OutputProtocol" << endl;
+    scope_up(f_service_);
+    indent(f_service_) << "get { return oprot_; }" << endl;
+    scope_down(f_service_);
+    f_service_ << endl << endl;
   }
 
   vector<t_function*> functions = tservice->get_functions();