aboutsummaryrefslogtreecommitdiff
path: root/csharp/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove a lot of projects which are effectively dead from the solution - ↵Jon Skeet2015-06-171-25/+1
| | | | files to be killed later.
* Use the fact that we know the tag size and bytes at codegen time to optimize.Jon Skeet2015-06-1711-1158/+893
|
* Regenerate proto filesJon Skeet2015-06-126-671/+838
|
* Reimplement RepeatedField<T> using an array as the backing store.Jon Skeet2015-06-125-51/+231
| | | | | | | | | | This is effectively reimplementing List<T>, but with a few advantages: - We know that an empty repeated field is common, so don't allocate an array until we need to - With direct access to the array, we can easily convert enum values to int without boxing - We can relax the restrictions over what happens if the repeated field is modified while iterating, avoiding so much checking This is somewhat risky, in that reimplementing a building block like this is *always* risky, but hey... (The performance benefits are significant...)
* Simplify ComputeInt32Size to call ComputeInt32SizeNoTag.Jon Skeet2015-06-121-11/+1
|
* Optimization to avoid foreach over empty lists.Jon Skeet2015-06-121-9/+64
|
* Fix incorrect handling of non-seekable streams.Jon Skeet2015-06-121-2/+2
| | | | | | This mirrors commit 7c86bbbc7a3365c034d82173b38ec4427b98b3b2 in the pull request to the main protobuf project, but also reduces the size of the buffer created. (There's no point in creating a 1024-byte buffer if we're only skipping 5 bytes...)
* Update the AddressBook tutorial to reflect the mutable design.Jon Skeet2015-06-124-1013/+284
|
* Coded*Stream streamlining.Jon Skeet2015-06-1216-2554/+855
| | | | Remove ICodedInputStream and ICodedOutputStream, and rewrite CodedInputStream and CodedOutputStream to be specific to the binary format. If we want to support text-based formats, that can be a whole different serialization mechanism.
* Reimplement enums as int values, and get rid of EnumHelper.Jon Skeet2015-06-1113-200/+126
| | | | This makes repeated fields really awkward at the moment - but when we reimplement RepeatedField<T> to be backed by an array, we can cast the array directly...
* Optimize WriteRawInt32 for the common case of a value < 128, which is a ↵Jon Skeet2015-06-111-0/+7
| | | | | | single byte. Aside from anything else, this will be used for all tags for fields 1-15.
* Improve string encoding times.Jon Skeet2015-06-112-5/+17
| | | | | Cache a reference to Encoding.UTF8 - the property access is (rather surprisingly) significant. Additionally, when we detect that the string is all ASCII (due to the computed length in bytes being the length in characters), we can perform the encoding very efficiently ourselves.
* Use expression trees to avoid boxing when converting enums.Jon Skeet2015-06-091-4/+12
|
* First pass at the mutable API. Quite a bit more to do - in particular, it's ↵Jon Skeet2015-06-09154-132841/+10808
| | | | pretty slow right now.
* Migrate writer to io::Printer for C#Jie Luo2015-06-043-15/+15
|
* Change the C# enum generator inherit from primitive generatorJie Luo2015-05-299-134/+654
|
* Add oneof support for C#Jie Luo2015-05-2929-2110/+4257
|
* Merge pull request #394 from ironhidegames/csharp-aot-iosJan Tattermusch2015-05-211-3/+15
|\ | | | | Solves AOT compilation issue for Unity - iOS
| * added concrete IEqualityComparer<ExtensionIntPair> implementation in ↵Ruben Garat2015-05-201-3/+15
| | | | | | | | ExtensionRegistryLite.cs to prevent AOT compilation issue with unity in iOS
* | Generate *all* protos in the script, applying fixups.Jon Skeet2015-05-164-39463/+31293
|/ | | | | | | | | | | | | | We still have some protos which aren't generated how we want them to be: - Until we have an option to specify the "umbrella" class, DescriptorProtoFile will be broken. (The change of name here affects the reflection descriptor, which accounts for most of the change. That's easier than trying to work out exactly which occurrences of Descriptor need changing though.) - That change affects UnittestCustomOptions - Issue #307 breaks Unittest.cs After this commit, we don't have the record of the fixups in the files themselves any more, but one centralized record in the shell script.
* Make generate_protos.sh Windows-friendly.Jon Skeet2015-05-141-6/+0
| | | | | | | | | | To my surprise, executing generate_protos.sh used the version of Bash installed with Git for Windows by default. After a few modifications to detect the most appropriate protoc to use, this worked pretty simply. This change also: - adds generation of the address book tutorial proto, - fixes the addressbook.proto to specify proto2 explicitly (to avoid a warning from protoc; I don't think we want warnings...) - fixes the addressbook.proto C# namespace (which I thought I'd done before, but apparently hadn't) - includes the regenerated UnittestCustomOptions.cs apart from the DescriptorProtoFIle => Descriptor change
* Regenerate UnittestDropUnknownFields.csJan Tattermusch2015-05-131-2/+2
|
* Remove the C#-specific field_presence_test.proto, using ↵Jon Skeet2015-05-134-785/+3779
| | | | | | | unittest_no_field_presence.proto instead. This is the start of establishing a C# namespace of "Google.ProtocolBuffers.TestProtos.Proto3" for proto3-syntax protos. We could optionally split the directory structure as well into Proto2 and Proto3 for clarity.
* regenerated UnittestImportLite.csJan Tattermusch2015-05-121-1/+3
|
* regenerated UnittestImportPublicLiteJan Tattermusch2015-05-121-1/+3
|
* Regenerated UnittestExtrasLite.csJan Tattermusch2015-05-121-51/+48
|
* Regenerated UnittestDropUnknownFields.csJan Tattermusch2015-05-121-77/+18
|
* remove C# files not referenced in any projectJan Tattermusch2015-05-125-11783/+0
|
* Regenerate some proto files after ClsCompliance has been droppedJan Tattermusch2015-05-123-47/+0
|
* rename FieldPresence to correct nameJan Tattermusch2015-05-122-1/+1
|
* Fix newline assertion in TestJsonFormatted on monoJan Tattermusch2015-05-121-1/+2
|
* remove TreatWarningsAsError setting to allow building in MonodevelopJan Tattermusch2015-05-127-14/+0
|
* Convert back to using NUnit, which is now loaded via NuGet.Jon Skeet2015-05-1248-3039/+3049
| | | | | This includes the NUnit test adapter which allows NUnit tests to be run under VS without any extra plugins. Unfortunate the compatibility tests using the abstract test fixture class show up as "external" tests, and aren't well presented - but they do run.
* Performance optimization for small messages without unknown fieldsJan Tattermusch2015-05-071-4/+24
|
* fix commentsJie Luo2015-05-014-6/+5
|
* Change field_presence_test.protoJie Luo2015-05-011-2/+1
|
* fix commentsJie Luo2015-04-303-34/+5
|
* fix commends from Jon SkeetJie Luo2015-04-307-48/+62
|
* Merge branch 'csharp' of git://github.com/google/protobuf into google-csharpJie Luo2015-04-30101-41114/+48783
|\
| * Change to using xUnit for all unit tests, and fetch that via NuGet.Jon Skeet2015-04-3050-3636/+3275
| | | | | | | | This includes fetching the VS unit test runner package, so that tests can be run from Visual Studio's Test Explorer.
| * Convert both the full and lite runtimes (and json/xml serialization ↵Jon Skeet2015-04-2954-37484/+45514
| | | | | | | | | | | | | | assemblies) to be Portable Class Libraries. All referring projects are now .NET 4 client rather than .NET 3.5. This commit also fixes up the ProtoBench app, which I'd neglected in previous commits. (Disentangling the two sets of changes would be time-consuming.)
* | Merge branch 'csharp' of git://github.com/google/protobuf into google-csharpJie Luo2015-04-29128-15575/+1194
|\|
| * Removing more C# project files.Jon Skeet2015-04-2918-1802/+0
| |
| * Remove CLS compliance from runtime code.Jon Skeet2015-04-2924-151/+1
| | | | | | | | We need to remove it from the generator too; I'll raise a github issue for that.
| * Update C# solution and AddressBook project.Jon Skeet2015-04-294-1389/+1192
| | | | | | | | | | | | | | | | Move to a single solution file containing all of the C# projects, but no other solution folders - it's easier to edit those files outside VS than keep adding and removing them from the project. The AddressBook protos have been regenerated (with a change to the example proto which I haven't included in this change - I'll wait for us to decide exactly what we're doing with namespaces before changing protos outside the csharp directory. Note that now we've got Addressbook.cs which contains AddressBook and Addressbook classes. It's bad enough that we've got a class called AddressBook within a namespace of AddressBook (hard to get away from) but having things vary just by case is nasty. This is more evidence that an option for renaming the file and descriptor class would be welcome. (A single option can probably handle both.)
| * Remove support for Serializable.Jon Skeet2015-04-299-465/+0
| | | | | | | | | | This could potentially be added back in later, but its use is limited and it's a pain in terms of support in PCL environments. One use that has been highlighted is passing objects between AppDomains; we'd recommend passing a byte array explicitly and reparsing on the other side.
| * Remove RPC support.Jon Skeet2015-04-298-481/+0
| | | | | | | | It is expected that third parties will generate service/RPC code themselves - see gRPC as an example.
| * Remove a bunch of files which are no longer relevant:Jon Skeet2015-04-2967-11286/+0
| | | | | | | | | | | | 1) Project files for different configurations - we're going to look at all this again, ideally to just have a single PCL-compatible build 2) ProtoGen - the C++ generator is now the only one we care about 3) Proto files - these are mostly duplicates (or older versions) of the ones in the common directories
* | rename FieldPResenceTest.cs fileJie Luo2015-04-291-28/+28
| |
* | Change the package for field_presence_test.protoJie Luo2015-04-292-989/+807
| |