aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp/csharp_generator.cc
Commit message (Collapse)AuthorAgeFilesLines
* C# Proto2 feature : Field presence and default values (#4642)Sydney Acksman2018-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Compiler changes * Generated code changes * Library changes * Compiler style changes * Generated style changes * Fix Windows build errors * Implement changes from review * Reintroduce proto2 check * Compiler changes (required handling review) * Generated code changes (required handling review) * Library changes (required handling review * Field presence rewrite (compiler changes) * Field presence rewrite (generated code changes) * Compiler comment * IFieldAccessor.HasValue library implementation * Remove Clear methods and default values from proto3 code (Compiler) * Remove Clear methods and default values from proto3 code (Generated) * Remove Clear methods and default values from proto3 code (Library) * Fix distcheck error * Rewrite default string values to use base64 and convert * Library changes (IMessage2) * Compiler changes (IMessage2) * Generated changes (IMessage2) * Rebased and regenerated * Compiler changes (initialized extension) * Generated changes (initialized extension) * Library changes (initialized extension) * Refactor MessageExtensions.IsRequired * Move string default value creator and bytes default value creator back to seperate methods * Dead code cleanup * Fixed segmentation fault Removed unused header method declarations
* Deleted scoped_ptr.hAdam Cozzette2018-03-141-3/+1
| | | | | We no longer need this, now that we have finished the switch to C++11 and are using std::unique_ptr.
* Removed using statements from common.hAdam Cozzette2018-01-261-1/+1
| | | | | | These statements pulled a bunch of symbols from the std namespace into the global namespace. This commit removes all of them except for std::string, which is a bit trickier to remove.
* Remove legacy_enum_values flag for GA.Jon Skeet2016-07-271-3/+0
|
* Add C# codegen changes to enum value names (mostly C++)Jon Skeet2016-04-201-0/+3
| | | | | | | | | | Overview of changes: - A new C#-specific command-line option, legacy_enum_values to revert to the old behavior - When legacy_enum_values isn't specified, we strip the enum name as a prefix, and PascalCase the value name - A new attribute within the C# code so that we can always tell the original in-proto name Regenerating the C# code with legacy_enum_values leads to code which still compiles and works - but there's more still to do.
* Added support for internal_access for C#Gaurav Vaish2016-04-071-0/+2
|
* Add more documentation for csharp_options.hJon Skeet2016-04-061-2/+2
| | | | | | This also renames generate_directories to base_namespace_specified; generating directories is the immediate *effect* of specifying a base namespace, but with this change the options reflect what has been specified rather than the effect. (There may be other effects in the future, of course.)
* Added access_level for typesGaurav Vaish2016-04-051-10/+16
| | | | | | | | | | | * `csharp_options`: Added `Options` to encapsulate generator options. Supported options for now - file_extension, base_namespace * `{Blah}Generator`: Now accept `Options*` as parameter to constructor * `csharp_generator.cc`: Parse and populate options * `Makefile.am`: Added `csharp_options.h` * `extract_includes.bat.in`: Added `csharp_options.h` Refactoring code to two commits. This is the first commit
* Rename "umbrella" to "reflection" consistently.Jon Skeet2015-11-191-3/+3
| | | | This changes csharp_names.h, which will require a corresponding change in GRPC.
* expose GetOutputFile in csharp_names.hJan Tattermusch2015-09-231-36/+1
|
* Generate a directory hierarchy based on namespace (C#)Jon Skeet2015-09-011-5/+47
| | | | | | | | | | | | | This introduces a new C# option, base_namespace. If the option is not specified, the behaviour is as before: no directories are generated. If the option *is* specified, all C# namespaces must be relative to the base namespace, and the directories are generated relative to that namespace. Example: - Any.proto declares csharp_namespace = "Google.Protobuf.WellKnownTypes" - We build with --csharp_out=Google.Protobuf --csharp_opt=base_namespace=Google.Protobuf - The Any.cs file is generated in Google.Protobuf/WellKnownTypes (where it currently lives) We need a change to descriptor.proto before this will all work (it wasn't in the right C# namespace) but that needs the other descriptors to be regenerated too. See next commit...
* refactor umbrella class helpersJan Tattermusch2015-07-301-1/+1
|
* Codegen changes to support descriptor runtime changesJon Skeet2015-07-091-0/+6
| | | | | | - Add a partial method called by all constructors - Generate internal classes for descriptor.proto (only) - Forbid proto2 descriptors except for descriptor.proto
* Migrate writer to io::Printer for C#Jie Luo2015-06-041-5/+3
|
* Remove ClsCompliant declarations from C# codeJie Luo2015-05-011-4/+1
|
* output file naming logic, configurable file extension, comment rewordingJan Tattermusch2015-04-131-6/+21
|
* updated C# codegen to use restricted set of csharp options from descriptor.protoJan Tattermusch2015-04-131-2/+4
|
* Rewrote C# protogen to C++ (initial version)Jan Tattermusch2015-03-261-0/+82