• Home
  • Raw
  • Download

Lines Matching full:out

71   // TODO: We really should work out which part to put in the summary and which  in GenerateDocCommentBodyImpl()
326 void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { in GenerateMarshallerFields() argument
330 out->Print( in GenerateMarshallerFields()
335 out->Indent(); in GenerateMarshallerFields()
336 out->Print( in GenerateMarshallerFields()
340 out->Indent(); in GenerateMarshallerFields()
341 out->Print( in GenerateMarshallerFields()
347 out->Outdent(); in GenerateMarshallerFields()
348 out->Print( in GenerateMarshallerFields()
351 out->Print( in GenerateMarshallerFields()
354 out->Outdent(); in GenerateMarshallerFields()
355 out->Print("}\n\n"); in GenerateMarshallerFields()
357 out->Print( in GenerateMarshallerFields()
360 out->Indent(); in GenerateMarshallerFields()
361 out->Print( in GenerateMarshallerFields()
366 out->Outdent(); in GenerateMarshallerFields()
367 out->Print("}\n\n"); in GenerateMarshallerFields()
369 out->Print( in GenerateMarshallerFields()
375 out->Indent(); in GenerateMarshallerFields()
376 out->Print( in GenerateMarshallerFields()
380 out->Indent(); in GenerateMarshallerFields()
381 out->Print( in GenerateMarshallerFields()
383 out->Outdent(); in GenerateMarshallerFields()
384 out->Print( in GenerateMarshallerFields()
387 out->Print("return parser.ParseFrom(context.PayloadAsNewBuffer());\n"); in GenerateMarshallerFields()
388 out->Outdent(); in GenerateMarshallerFields()
389 out->Print("}\n\n"); in GenerateMarshallerFields()
394 out->Print( in GenerateMarshallerFields()
401 out->Print("\n"); in GenerateMarshallerFields()
404 void GenerateStaticMethodField(Printer* out, const MethodDescriptor* method) { in GenerateStaticMethodField() argument
405 out->Print( in GenerateStaticMethodField()
411 out->Indent(); in GenerateStaticMethodField()
412 out->Indent(); in GenerateStaticMethodField()
413 out->Print("$methodtype$,\n", "methodtype", in GenerateStaticMethodField()
415 out->Print("$servicenamefield$,\n", "servicenamefield", in GenerateStaticMethodField()
417 out->Print("\"$methodname$\",\n", "methodname", method->name()); in GenerateStaticMethodField()
418 out->Print("$requestmarshaller$,\n", "requestmarshaller", in GenerateStaticMethodField()
420 out->Print("$responsemarshaller$);\n", "responsemarshaller", in GenerateStaticMethodField()
422 out->Print("\n"); in GenerateStaticMethodField()
423 out->Outdent(); in GenerateStaticMethodField()
424 out->Outdent(); in GenerateStaticMethodField()
427 void GenerateServiceDescriptorProperty(Printer* out, in GenerateServiceDescriptorProperty() argument
431 out->Print("/// <summary>Service descriptor</summary>\n"); in GenerateServiceDescriptorProperty()
432 out->Print( in GenerateServiceDescriptorProperty()
435 out->Print("{\n"); in GenerateServiceDescriptorProperty()
436 out->Print(" get { return $umbrella$.Descriptor.Services[$index$]; }\n", in GenerateServiceDescriptorProperty()
439 out->Print("}\n"); in GenerateServiceDescriptorProperty()
440 out->Print("\n"); in GenerateServiceDescriptorProperty()
443 void GenerateServerClass(Printer* out, const ServiceDescriptor* service) { in GenerateServerClass() argument
444 out->Print( in GenerateServerClass()
448 out->Print( in GenerateServerClass()
452 out->Print("public abstract partial class $name$\n", "name", in GenerateServerClass()
454 out->Print("{\n"); in GenerateServerClass()
455 out->Indent(); in GenerateServerClass()
458 GenerateDocCommentServerMethod(out, method); in GenerateServerClass()
459 out->Print( in GenerateServerClass()
467 out->Print("{\n"); in GenerateServerClass()
468 out->Indent(); in GenerateServerClass()
469 out->Print( in GenerateServerClass()
472 out->Outdent(); in GenerateServerClass()
473 out->Print("}\n\n"); in GenerateServerClass()
475 out->Outdent(); in GenerateServerClass()
476 out->Print("}\n"); in GenerateServerClass()
477 out->Print("\n"); in GenerateServerClass()
480 void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { in GenerateClientStub() argument
481 out->Print("/// <summary>Client for $servicename$</summary>\n", "servicename", in GenerateClientStub()
483 out->Print("public partial class $name$ : grpc::ClientBase<$name$>\n", "name", in GenerateClientStub()
485 out->Print("{\n"); in GenerateClientStub()
486 out->Indent(); in GenerateClientStub()
489 out->Print( in GenerateClientStub()
494 out->Print("public $name$(grpc::ChannelBase channel) : base(channel)\n", in GenerateClientStub()
496 out->Print("{\n"); in GenerateClientStub()
497 out->Print("}\n"); in GenerateClientStub()
498 out->Print( in GenerateClientStub()
504 out->Print( in GenerateClientStub()
507 out->Print("{\n"); in GenerateClientStub()
508 out->Print("}\n"); in GenerateClientStub()
509 out->Print( in GenerateClientStub()
512 out->Print("protected $name$() : base()\n", "name", in GenerateClientStub()
514 out->Print("{\n"); in GenerateClientStub()
515 out->Print("}\n"); in GenerateClientStub()
516 out->Print( in GenerateClientStub()
520 out->Print( in GenerateClientStub()
524 out->Print("{\n"); in GenerateClientStub()
525 out->Print("}\n\n"); in GenerateClientStub()
533 GenerateDocCommentClientMethod(out, method, true, false); in GenerateClientStub()
534 out->Print( in GenerateClientStub()
544 out->Print("{\n"); in GenerateClientStub()
545 out->Indent(); in GenerateClientStub()
546 out->Print( in GenerateClientStub()
551 out->Outdent(); in GenerateClientStub()
552 out->Print("}\n"); in GenerateClientStub()
555 GenerateDocCommentClientMethod(out, method, true, true); in GenerateClientStub()
556 out->Print( in GenerateClientStub()
562 out->Print("{\n"); in GenerateClientStub()
563 out->Indent(); in GenerateClientStub()
564 out->Print( in GenerateClientStub()
568 out->Outdent(); in GenerateClientStub()
569 out->Print("}\n"); in GenerateClientStub()
576 GenerateDocCommentClientMethod(out, method, false, false); in GenerateClientStub()
577 out->Print( in GenerateClientStub()
587 out->Print("{\n"); in GenerateClientStub()
588 out->Indent(); in GenerateClientStub()
590 out->Print( in GenerateClientStub()
596 out->Outdent(); in GenerateClientStub()
597 out->Print("}\n"); in GenerateClientStub()
600 GenerateDocCommentClientMethod(out, method, false, true); in GenerateClientStub()
601 out->Print( in GenerateClientStub()
608 out->Print("{\n"); in GenerateClientStub()
609 out->Indent(); in GenerateClientStub()
612 out->Print( in GenerateClientStub()
618 out->Print( in GenerateClientStub()
624 out->Print( in GenerateClientStub()
630 out->Print( in GenerateClientStub()
638 out->Outdent(); in GenerateClientStub()
639 out->Print("}\n"); in GenerateClientStub()
643 out->Print( in GenerateClientStub()
646 out->Print( in GenerateClientStub()
650 out->Print("{\n"); in GenerateClientStub()
651 out->Indent(); in GenerateClientStub()
652 out->Print("return new $name$(configuration);\n", "name", in GenerateClientStub()
654 out->Outdent(); in GenerateClientStub()
655 out->Print("}\n"); in GenerateClientStub()
657 out->Outdent(); in GenerateClientStub()
658 out->Print("}\n"); in GenerateClientStub()
659 out->Print("\n"); in GenerateClientStub()
662 void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor* service) { in GenerateBindServiceMethod() argument
663 out->Print( in GenerateBindServiceMethod()
666 out->Print( in GenerateBindServiceMethod()
669 out->Print( in GenerateBindServiceMethod()
673 out->Print("{\n"); in GenerateBindServiceMethod()
674 out->Indent(); in GenerateBindServiceMethod()
676 out->Print("return grpc::ServerServiceDefinition.CreateBuilder()"); in GenerateBindServiceMethod()
677 out->Indent(); in GenerateBindServiceMethod()
678 out->Indent(); in GenerateBindServiceMethod()
681 out->Print("\n.AddMethod($methodfield$, serviceImpl.$methodname$)", in GenerateBindServiceMethod()
685 out->Print(".Build();\n"); in GenerateBindServiceMethod()
686 out->Outdent(); in GenerateBindServiceMethod()
687 out->Outdent(); in GenerateBindServiceMethod()
689 out->Outdent(); in GenerateBindServiceMethod()
690 out->Print("}\n"); in GenerateBindServiceMethod()
691 out->Print("\n"); in GenerateBindServiceMethod()
694 void GenerateBindServiceWithBinderMethod(Printer* out, in GenerateBindServiceWithBinderMethod() argument
696 out->Print( in GenerateBindServiceWithBinderMethod()
703 out->Print( in GenerateBindServiceWithBinderMethod()
707 out->Print( in GenerateBindServiceWithBinderMethod()
710 out->Print( in GenerateBindServiceWithBinderMethod()
715 out->Print("{\n"); in GenerateBindServiceWithBinderMethod()
716 out->Indent(); in GenerateBindServiceWithBinderMethod()
720 out->Print( in GenerateBindServiceWithBinderMethod()
730 out->Outdent(); in GenerateBindServiceWithBinderMethod()
731 out->Print("}\n"); in GenerateBindServiceWithBinderMethod()
732 out->Print("\n"); in GenerateBindServiceWithBinderMethod()
735 void GenerateService(Printer* out, const ServiceDescriptor* service, in GenerateService() argument
738 GenerateDocCommentBody(out, service); in GenerateService()
739 out->Print("$access_level$ static partial class $classname$\n", in GenerateService()
742 out->Print("{\n"); in GenerateService()
743 out->Indent(); in GenerateService()
744 out->Print("static readonly string $servicenamefield$ = \"$servicename$\";\n", in GenerateService()
747 out->Print("\n"); in GenerateService()
749 GenerateMarshallerFields(out, service); in GenerateService()
751 GenerateStaticMethodField(out, service->method(i)); in GenerateService()
753 GenerateServiceDescriptorProperty(out, service); in GenerateService()
756 GenerateServerClass(out, service); in GenerateService()
759 GenerateClientStub(out, service); in GenerateService()
762 GenerateBindServiceMethod(out, service); in GenerateService()
763 GenerateBindServiceWithBinderMethod(out, service); in GenerateService()
766 out->Outdent(); in GenerateService()
767 out->Print("}\n"); in GenerateService()
779 Printer out(&output_stream, '$'); in GetServices() local
781 // Don't write out any output if there no services, to avoid empty service in GetServices()
787 // Write out a file header. in GetServices()
788 out.Print("// <auto-generated>\n"); in GetServices()
789 out.Print( in GetServices()
791 out.Print("// source: $filename$\n", "filename", file->name()); in GetServices()
792 out.Print("// </auto-generated>\n"); in GetServices()
797 out.Print("// Original file comments:\n"); in GetServices()
798 out.PrintRaw(leading_comments.c_str()); in GetServices()
801 out.Print("#pragma warning disable 0414, 1591\n"); in GetServices()
803 out.Print("#region Designer generated code\n"); in GetServices()
804 out.Print("\n"); in GetServices()
805 out.Print("using grpc = global::Grpc.Core;\n"); in GetServices()
806 out.Print("\n"); in GetServices()
810 out.Print("namespace $namespace$ {\n", "namespace", file_namespace); in GetServices()
811 out.Indent(); in GetServices()
814 GenerateService(&out, file->service(i), generate_client, generate_server, in GetServices()
818 out.Outdent(); in GetServices()
819 out.Print("}\n"); in GetServices()
821 out.Print("#endregion\n"); in GetServices()