aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/csharp
Commit message (Collapse)AuthorAge
* Add auto detect for generated code of WKT protos, addressbook.proto and ↵Gravatar Jie Luo2017-03-10
| | | | conformance.proto
* Detect if Descriptor.cs changes for csharpGravatar Jie Luo2017-03-02
|
* There might be duplicated enum values when allow_alias is true. Add ↵Gravatar Jie Luo2017-02-28
| | | | PreferredAlias into OriginalNameAttribute to remove the duplication (#2727)
* Support custom options in C#Gravatar Jon Skeet2017-01-19
| | | | | | | | | | | | This consists of: - Changing the codegen for the fixed set of options protos, to parse unknown fields instead of skipping them - Add a new CustomOptions type in the C# support library - Expose CustomOptions properties from the immutable proto wrappers in the support library Only single-value options are currently supported, and fetching options values requires getting the type right and knowing the field number. Both of these can be addressed at a later time. Fixes #2143, at least as a first pass.
* Fixing code formatting issuesGravatar Andrew Spiering2017-01-11
|
* Added the support for class level deprecation which will in turn also ↵Gravatar Andrew Spiering2016-12-21
| | | | deprecate any fields that are currently using that type
* Merge pull request #2227 from KindDragon/3.1.xGravatar Feng Xiao2016-12-16
|\ | | | | Missed LIBPROTOC_EXPORT for GRPC added
* | remove leading whitespace in C# xml commentsGravatar Jan Tattermusch2016-12-12
| |
| * LIBPROTOC_EXPORT added to others functions in csharp_names.h and ↵Gravatar Arkadiy Shapkin2016-12-01
| | | | | | | | objectivec_helpers.h
| * Missed LIBPROTOC_EXPORT for GRPC addedGravatar Arkadiy Shapkin2016-12-01
|/
* Merge pull request #1862 from pherl/3.0.0-GAGravatar Jisi Liu2016-09-02
|\ | | | | Cherry pick c# changes from master
* | Add and fix C++ runtime docsGravatar Jisi Liu2016-08-02
| |
| * Remove legacy_enum_values flag for GA.Gravatar Jon Skeet2016-07-27
|/
* Remove WriteGeneratedTypeAttributes which is a no-opGravatar Jon Skeet2016-07-07
| | | | | | This does not affect the generated code. If we decide we want to apply attributes to generated types, we should start by just reverting this change.
* Move DebuggerNonUserCodeAttribute to function membersGravatar Jon Skeet2016-07-04
| | | | | | | | | I think this has caught everything. I've left a stub for attributes to be applied to the types themselves, but we don't currently need anything. Follow-up commit will include the changes to generated code itself. Fixes #1671.
* Attempt to fix AppVeyor build by exporting GetEnumValueNameGravatar Jon Skeet2016-04-20
|
* Add C# codegen changes to enum value names (mostly C++)Gravatar Jon Skeet2016-04-20
| | | | | | | | | | 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.
* Use 0 as the default value for all enums, rather than finding the actual ↵Gravatar Jon Skeet2016-04-11
| | | | | | enum value name This will make it easier to change the enum value names, as it reduces the number of places they're used.
* Fix to csharp_options - initialize internal_access to false.Gravatar Jon Skeet2016-04-08
|
* Added support for internal_access for C#Gravatar Gaurav Vaish2016-04-07
|
* Add more documentation for csharp_options.hGravatar Jon Skeet2016-04-06
| | | | | | 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.)
* Line-wrapping changes only for C# generator codeGravatar Jon Skeet2016-04-06
| | | | | | | | This should have no behavioral changes at all. This doesn't strictly enforce an 80-column limit, but removes the most egregious violations. The indentation in the C# generator code is inconsistent in general, unfortunately - if we have any good tools that can be trusted to reformat, I'd be happy to apply them.
* Added access_level for typesGravatar Gaurav Vaish2016-04-05
| | | | | | | | | | | * `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 Preconditions to ProtoPreconditionsGravatar Jon Skeet2016-02-04
| | | | (Generated code changes in next commit.)
* Rename GeneratedCodeInfo to GeneratedClrTypeInfoGravatar Jon Skeet2016-02-04
| | | | | | | Recently, descriptor.proto gained a GeneratedCodeInfo message, which means the generated code conflicts with our type. Unfortunately this affects codegen as well, although this is a part of the public API which is very unlikely to affect hand-written code. Generated code changes in next commit.
* Prohibit null values in map fieldsGravatar Jon Skeet2016-01-11
| | | | | On deserialization, missing values for message types are replaced with a "default" message.
* Make ToString() valid without a type registryGravatar Jon Skeet2015-12-15
| | | | | | | | | | | | | | | This addresses issue #1008, by creating a JsonFormatter which is private and only different to JsonFormatter.Default in terms of reference equality. Other plausible designs: - The same, but expose the diagnostic-only formatter - Add something to settings to say "I don't have a type registry at all" - Change the behaviour of JsonFormatter.Default (bad idea IMO, as we really *don't* want the result of this used as regular JSON to be parsed) Note that just trying to find a separate fix to issue #933 and using that to override Any.ToString() differently wouldn't work for messages that *contain* an Any. Generated code changes follow in the next commit.
* Tidy up reflection in advance of attempting to implement DynamicMessage.Gravatar Jon Skeet2015-11-22
| | | | | | | | | There are corner cases where MessageDescriptor.{ClrType,Parser} will return null, and these are now documented. However, normally they *should* be implemented, even for descriptors of for dynamic messages. Ditto FieldDescriptor.Accessor. We'll still need a fair amount of work to implement dynamic messages, but this change means that the public API will be remain intact. Additionally, this change starts making use of C# 6 features in the files that it touches. This is far from exhaustive, and later PRs will have more. Generated code changes coming in the next commit.
* Rename "umbrella" to "reflection" consistently.Gravatar Jon Skeet2015-11-19
| | | | This changes csharp_names.h, which will require a corresponding change in GRPC.
* Introduce a Parser property into MessageDescriptor, and populate it from ↵Gravatar Jon Skeet2015-11-19
| | | | | | generated types. Generated code coming in next commit - in a subsequent PR I want to do a bit of renaming and redocumenting around this, in anticipation of DynamicMessage.
* Change how the reflection descriptor class is generated.Gravatar Jon Skeet2015-11-09
| | | | | Instead of having a Proto nested namespace to avoid conflicts between the descriptor-holding static class and message classes, just append "Reflection" to the name. Generated code changes (and corresponding manual changes) in following commit.
* Stop removing all blank lines in doc comments.Gravatar Jon Skeet2015-11-06
| | | | | | This fixes issue #832. Generated code changes in next commit.
* Include the oneof-case in equality and hash code generated code.Gravatar Jon Skeet2015-10-24
| | | | The included C# test will fail until the regenerated code is used, which is in the next commit.
* Merge pull request #824 from jtattermusch/expose_get_output_fileGravatar Jan Tattermusch2015-10-14
|\ | | | | Expose GetOutputFile in csharp_names.h
* | First pass at generating XML documentation from .proto comments.Gravatar Jon Skeet2015-10-01
| | | | | | | | | | | | This could be tidied up significantly, and at some point we will want to parse the markdown and generate more appropriate XML - but this is definitely better than nothing. Generated code changes coming in next commit.
* | Fix typo in oneof case enum commentGravatar Jon Skeet2015-09-30
| |
* | Move the summary comments above the attributes.Gravatar Jon Skeet2015-09-29
| | | | | | | | (Generated code changes coming next...)
* | Added documentation to generated code.Gravatar Jon Skeet2015-09-29
| | | | | | | | | | | | | | | | | | | | | | There are now summaries for: - The Types nested class (which holds nested types) - The file descriptor class for each proto - The enum generated for each oneof (Also fixed two typos.) Generated code in next commit.
| * expose GetOutputFile in csharp_names.hGravatar Jan Tattermusch2015-09-23
|/
* Stop adding a space to the end of lines for descriptor binary data.Gravatar Jon Skeet2015-09-01
|
* Generate a directory hierarchy based on namespace (C#)Gravatar Jon Skeet2015-09-01
| | | | | | | | | | | | | 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...
* Remove vestigial reference to MakeFixedTagGravatar Jon Skeet2015-09-01
|
* Change where we rename Descriptor.cs to DescriptorProtoFile.cs.Gravatar Jon Skeet2015-08-25
| | | | | | | | | | | We now do this in protoc instead of the generation simpler. Benefits: - Generation script is simpler - Detection is simpler as we now only need to care about one filename - The embedded descriptor knows itself as "google/protobuf/descriptor.proto" avoiding dependency issues This PR also makes the "invalid dependency" exception clearer in terms of expected and actual dependencies.
* fix type initialization problem with FileDescriptorGravatar Jan Tattermusch2015-08-14
|
* Allow public access to descriptor.proto as a dependency.Gravatar Jon Skeet2015-08-13
| | | | | With this in place, generating APIs on github.com/google/googleapis works - previously annotations.proto failed. Currently there's no access to the annotations (stored as extensions) but we could potentially expose those at a later date.
* Merge pull request #700 from jskeet/remove-packed-hackGravatar Jan Tattermusch2015-08-08
|\ | | | | Remove our own version of MakeTag now that the main one is fixed.
| * Remove our own version of MakeTag now that the main one is fixed.Gravatar Jon Skeet2015-08-07
| | | | | | | | "Tested" by regenerating code and observing that there are no changes.
* | Skip groups properly.Gravatar Jon Skeet2015-08-06
|/ | | | | | | | | | | Now the generated code doesn't need to check for end group tags, as it will skip whole groups at a time. Currently it will ignore extraneous end group tags, which may or may not be a good thing. Renamed ConsumeLastField to SkipLastField as it felt more natural. Removed WireFormat.IsEndGroupTag as it's no longer useful. This mostly fixes issue 688. (Generated code changes coming in next commit.)
* Change ReadTag and PeekTag to just use 0 as a return value for "end of ↵Gravatar Jon Skeet2015-08-05
| | | | | | | | stream", rather than using an awkward out parameter. This simplifies quite a lot of code. Generated code in next commit.
* Consume unknown fields when parsing.Gravatar Jon Skeet2015-08-05
| | | | | This is expected to be the cause of the conformance test failures. Generated code in next commit.