Public access to the protocols in C# Thrift clients.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665573 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 f997630..786fd50 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -710,8 +710,18 @@
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();