diff options
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_helpers.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.h b/src/google/protobuf/compiler/csharp/csharp_helpers.h index 111feabd..653ff992 100644 --- a/src/google/protobuf/compiler/csharp/csharp_helpers.h +++ b/src/google/protobuf/compiler/csharp/csharp_helpers.h @@ -119,6 +119,15 @@ inline bool IsDescriptorProto(const FileDescriptor* descriptor) { return descriptor->name() == "google/protobuf/descriptor_proto_file.proto"; } +inline bool IsMapEntry(const Descriptor* descriptor) { + return descriptor->options().map_entry(); +} + +inline bool IsWrapperType(const FieldDescriptor* descriptor) { + return descriptor->type() == FieldDescriptor::TYPE_MESSAGE && + descriptor->message_type()->file()->name() == "google/protobuf/wrappers.proto"; +} + } // namespace csharp } // namespace compiler } // namespace protobuf |