| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 SourceGeneratorBase::SourceGeneratorBase(const FileDescriptor* descriptor, | 50 SourceGeneratorBase::SourceGeneratorBase(const FileDescriptor* descriptor, |
| 51 const Options *options) | 51 const Options *options) |
| 52 : descriptor_(descriptor), options_(options) { | 52 : descriptor_(descriptor), options_(options) { |
| 53 } | 53 } |
| 54 | 54 |
| 55 SourceGeneratorBase::~SourceGeneratorBase() { | 55 SourceGeneratorBase::~SourceGeneratorBase() { |
| 56 } | 56 } |
| 57 | 57 |
| 58 void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) { | 58 void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) { |
| 59 // This hook can be used to reintroduce generated code attributes in the futur
e. | 59 printer->Print("[global::System.Diagnostics.DebuggerNonUserCodeAttribute]\n"); |
| 60 } | 60 } |
| 61 | 61 |
| 62 std::string SourceGeneratorBase::class_access_level() { | 62 std::string SourceGeneratorBase::class_access_level() { |
| 63 return (IsDescriptorProto(descriptor_) || this->options()->internal_access) ?
"internal" : "public"; | 63 return (IsDescriptorProto(descriptor_) || this->options()->internal_access) ?
"internal" : "public"; |
| 64 } | 64 } |
| 65 | 65 |
| 66 const Options* SourceGeneratorBase::options() { | 66 const Options* SourceGeneratorBase::options() { |
| 67 return this->options_; | 67 return this->options_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace csharp | 70 } // namespace csharp |
| 71 } // namespace compiler | 71 } // namespace compiler |
| 72 } // namespace protobuf | 72 } // namespace protobuf |
| 73 } // namespace google | 73 } // namespace google |
| OLD | NEW |