Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
bfcd6b62
Commit
bfcd6b62
authored
Jun 22, 2016
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
generate comments for C# client constructors
parent
f41ebc39
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/compiler/csharp_generator.cc
+9
-3
9 additions, 3 deletions
src/compiler/csharp_generator.cc
with
9 additions
and
3 deletions
src/compiler/csharp_generator.cc
+
9
−
3
View file @
bfcd6b62
...
@@ -333,10 +333,16 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
...
@@ -333,10 +333,16 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
out
->
Indent
();
out
->
Indent
();
// constructors
// constructors
out
->
Print
(
"/// <summary>Creates a new client for $servicename$</summary>
\n
"
"/// <param name=
\"
channel
\"
>The channel to use to make remote calls.</param>
\n
"
,
"servicename"
,
GetServiceClassName
(
service
));
out
->
Print
(
"public $name$(Channel channel) : base(channel)
\n
"
,
out
->
Print
(
"public $name$(Channel channel) : base(channel)
\n
"
,
"name"
,
GetClientClassName
(
service
));
"name"
,
GetClientClassName
(
service
));
out
->
Print
(
"{
\n
"
);
out
->
Print
(
"{
\n
"
);
out
->
Print
(
"}
\n
"
);
out
->
Print
(
"}
\n
"
);
out
->
Print
(
"/// <summary>Creates a new client for $servicename$ that uses a custom <c>CallInvoker</c>.</summary>
\n
"
"/// <param name=
\"
callInvoker
\"
>The callInvoker to use to make remote calls.</param>
\n
"
,
"servicename"
,
GetServiceClassName
(
service
));
out
->
Print
(
"public $name$(CallInvoker callInvoker) : base(callInvoker)
\n
"
,
out
->
Print
(
"public $name$(CallInvoker callInvoker) : base(callInvoker)
\n
"
,
"name"
,
GetClientClassName
(
service
));
"name"
,
GetClientClassName
(
service
));
out
->
Print
(
"{
\n
"
);
out
->
Print
(
"{
\n
"
);
...
@@ -347,8 +353,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
...
@@ -347,8 +353,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
"name"
,
GetClientClassName
(
service
));
"name"
,
GetClientClassName
(
service
));
out
->
Print
(
"{
\n
"
);
out
->
Print
(
"{
\n
"
);
out
->
Print
(
"}
\n
"
);
out
->
Print
(
"}
\n
"
);
out
->
Print
(
"///<summary>Protected constructor to allow creation of configured"
out
->
Print
(
"///
<summary>Protected constructor to allow creation of configured
clients.</summary>
\n
"
"
clients.</summary
>
\n
"
);
"
/// <param name=
\"
configuration
\"
>The client configuration.</param
>
\n
"
);
out
->
Print
(
"protected $name$(ClientBaseConfiguration configuration)"
out
->
Print
(
"protected $name$(ClientBaseConfiguration configuration)"
" : base(configuration)
\n
"
,
" : base(configuration)
\n
"
,
"name"
,
GetClientClassName
(
service
));
"name"
,
GetClientClassName
(
service
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment