diff options
author | murgatroid99 <mlumish@google.com> | 2016-05-20 13:24:59 -0700 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2016-05-20 13:24:59 -0700 |
commit | 210f3c4b8e3088fc26e674841c7c992ef1c7d609 (patch) | |
tree | 23a3744021eb06dc270e507faf657de950113ddc /src/compiler/csharp_generator_helpers.h | |
parent | 3c62c555a4d1b4385d4f8c6c9f533c34c82cec5a (diff) |
Added comments to node generation, also refactored some plugin code
Diffstat (limited to 'src/compiler/csharp_generator_helpers.h')
-rw-r--r-- | src/compiler/csharp_generator_helpers.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/csharp_generator_helpers.h b/src/compiler/csharp_generator_helpers.h index 5639ea058b..9bdf6fb535 100644 --- a/src/compiler/csharp_generator_helpers.h +++ b/src/compiler/csharp_generator_helpers.h @@ -45,6 +45,13 @@ inline bool ServicesFilename(const grpc::protobuf::FileDescriptor *file, return true; } +// Get leading or trailing comments in a string. Comment lines start with "// ". +// Leading detached comments are put in in front of leading comments. +template <typename DescriptorType> +inline grpc::string GetCsharpComments(const DescriptorType *desc, bool leading) { + return grpc_generator::GetPrefixedComments(desc, leading, "//"); +} + } // namespace grpc_csharp_generator #endif // GRPC_INTERNAL_COMPILER_CSHARP_GENERATOR_HELPERS_H |