From cdfbeb8d756c3f76fa2ac8a62e48ca81e46674f1 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Tue, 18 Mar 2008 18:22:14 +0000 Subject: [PATCH] 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 --- compiler/cpp/src/generate/t_csharp_generator.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc index f9976302..786fd508 100644 --- a/compiler/cpp/src/generate/t_csharp_generator.cc +++ b/compiler/cpp/src/generate/t_csharp_generator.cc @@ -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 functions = tservice->get_functions(); -- 2.17.1