From edfebc909a7e4a2ada5e07d2012a227fb15d4064 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 16:39:21 -0700 Subject: [PATCH] dont generate NewClient method for C# services --- src/compiler/csharp_generator.cc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index fc8feaf0fcc..8c1c6f2c826 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -485,20 +485,6 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service) { out->Print("\n"); } -void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) { - out->Print("/// Creates a new client for $servicename$\n", - "servicename", GetServiceClassName(service)); - out->Print("public static $classname$ NewClient(Channel channel)\n", - "classname", GetClientClassName(service)); - out->Print("{\n"); - out->Indent(); - out->Print("return new $classname$(channel);\n", "classname", - GetClientClassName(service)); - out->Outdent(); - out->Print("}\n"); - out->Print("\n"); -} - void GenerateService(Printer* out, const ServiceDescriptor *service, bool generate_client, bool generate_server, bool internal_access) { @@ -524,7 +510,6 @@ void GenerateService(Printer* out, const ServiceDescriptor *service, } if (generate_client) { GenerateClientStub(out, service); - GenerateNewStubMethods(out, service); } if (generate_server) { GenerateBindServiceMethod(out, service);