Skip to content
Snippets Groups Projects
Commit 641cb1be authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

update generator

parent a9ddd02d
No related branches found
No related tags found
No related merge requests found
...@@ -356,9 +356,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { ...@@ -356,9 +356,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
GetClassName(method->output_type())); GetClassName(method->output_type()));
out->Print("{\n"); out->Print("{\n");
out->Indent(); out->Indent();
out->Print("var call = CreateCall($servicenamefield$, $methodfield$, new CallContext(headers, deadline, cancellationToken));\n", out->Print("var call = CreateCall($methodfield$, new CallContext(headers, deadline, cancellationToken));\n",
"servicenamefield", GetServiceNameFieldName(), "methodfield", "methodfield", GetMethodFieldName(method));
GetMethodFieldName(method));
out->Print("return Calls.BlockingUnaryCall(call, request);\n"); out->Print("return Calls.BlockingUnaryCall(call, request);\n");
out->Outdent(); out->Outdent();
out->Print("}\n"); out->Print("}\n");
...@@ -371,9 +370,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { ...@@ -371,9 +370,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
GetClassName(method->output_type())); GetClassName(method->output_type()));
out->Print("{\n"); out->Print("{\n");
out->Indent(); out->Indent();
out->Print("var call = CreateCall($servicenamefield$, $methodfield$, context);\n", out->Print("var call = CreateCall($methodfield$, context);\n",
"servicenamefield", GetServiceNameFieldName(), "methodfield", "methodfield", GetMethodFieldName(method));
GetMethodFieldName(method));
out->Print("return Calls.BlockingUnaryCall(call, request);\n"); out->Print("return Calls.BlockingUnaryCall(call, request);\n");
out->Outdent(); out->Outdent();
out->Print("}\n"); out->Print("}\n");
...@@ -390,9 +388,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { ...@@ -390,9 +388,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
GetMethodReturnTypeClient(method)); GetMethodReturnTypeClient(method));
out->Print("{\n"); out->Print("{\n");
out->Indent(); out->Indent();
out->Print("var call = CreateCall($servicenamefield$, $methodfield$, new CallContext(headers, deadline, cancellationToken));\n", out->Print("var call = CreateCall($methodfield$, new CallContext(headers, deadline, cancellationToken));\n",
"servicenamefield", GetServiceNameFieldName(), "methodfield", "methodfield", GetMethodFieldName(method));
GetMethodFieldName(method));
switch (GetMethodType(method)) { switch (GetMethodType(method)) {
case METHODTYPE_NO_STREAMING: case METHODTYPE_NO_STREAMING:
out->Print("return Calls.AsyncUnaryCall(call, request);\n"); out->Print("return Calls.AsyncUnaryCall(call, request);\n");
...@@ -421,9 +418,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { ...@@ -421,9 +418,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
GetMethodReturnTypeClient(method)); GetMethodReturnTypeClient(method));
out->Print("{\n"); out->Print("{\n");
out->Indent(); out->Indent();
out->Print("var call = CreateCall($servicenamefield$, $methodfield$, context);\n", out->Print("var call = CreateCall($methodfield$, context);\n",
"servicenamefield", GetServiceNameFieldName(), "methodfield", "methodfield", GetMethodFieldName(method));
GetMethodFieldName(method));
switch (GetMethodType(method)) { switch (GetMethodType(method)) {
case METHODTYPE_NO_STREAMING: case METHODTYPE_NO_STREAMING:
out->Print("return Calls.AsyncUnaryCall(call, request);\n"); out->Print("return Calls.AsyncUnaryCall(call, request);\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment