merged issue-28
diff --git a/CHANGES.txt b/CHANGES.txt
new file mode 100644
index 0000000..d3e5a85
--- /dev/null
+++ b/CHANGES.txt
@@ -0,0 +1,92 @@
+===============================================================================
+Welcome to the C# port of Google Protocol Buffers, written by Jon Skeet
+(skeet@pobox.com) based on the work of many talented people.
+
+For more information about this port, visit its homepage:
+http://protobuf-csharp-port.googlecode.com
+
+For more information about Protocol Buffers in general, visit the project page
+for the C++, Java and Python project:
+http://protobuf.googlecode.com
+===============================================================================
+RELEASE NOTES - Version TBD
+===============================================================================
+
+(PENDING MERGE)
+- Issue 20: Support for decorating classes [Serializable]
+- Issue 22: Reusable Builder classes
+- Issue 24: Support for using Json/Xml formats with ICodedInputStream
+
+Features:
+- Added option service_generator_type to control service generation with
+ NONE, GENERIC, INTERFACE, or IRPCDISPATCH
+- Added interfaces IRpcDispatch and IRpcServerStub to provide for blocking
+ services and implementations.
+- Added ProtoGen.exe command-line argument "--protoc_dir=" to specify the
+ location of protoc.exe.
+- Extracted interfaces for ICodedInputStream and ICodedOutputStream to allow
+ custom implementation of writers with both speed and size optimizations.
+- Addition of the "Google.ProtoBuffers.Serialization" assembly to support
+ reading and writing messages to/from XML, JSON, IDictionary<,> and others.
+- Several performance related fixes and tweeks
+- Issue 3: Add option to mark generated code with attribute
+- Issue 21: Decorate fields with [deprecated=true] as [System.Obsolete]
+
+Fixes:
+- Issue 13: Message with Field same name as message causes uncompilable .cs
+- Issue 16: Does not integrate well with other tooling
+- Issue 19: Support for negative enum values
+- Issue 26: AddRange in GeneratedBuilder iterates twice.
+- Issue 27: Remove XML documentation output from test projects to clear
+ warnings/errors.
+- Big-endian support for float, and double on Silverlight
+- Packed and Unpacked parsing allow for all repeated, as per version 2.3
+- Fix for leaving Builder a public ctor on internal classes for use with
+ generic "where T: new()" constraints.
+
+Other:
+- Reformatted all code and line-endings to C# defaults
+- Reworking of performance benchmarks to produce reliable results, option /v2
+
+===============================================================================
+RELEASE NOTES - Version 2.3.0.277
+===============================================================================
+
+Features:
+- Added cls_compliance option to generate attributes indicating
+ non-CLS-compliance.
+- Added file_extension option to control the generated output file's extension.
+- Added umbrella_namespace option to place the umbrella class into a nested
+ namespace to address issues with proto files having the same name as a
+ message it contains.
+- Added output_directory option to set the output path for the source file(s).
+- Added ignore_google_protobuf option to avoid generating code for includes
+ from the google.protobuf package.
+- Added the LITE framework (Google.ProtoBuffersLite.dll) and the ability to
+ generate code with "option optimize_for = LITE_RUNTIME;".
+- Added ability to invoke protoc.exe from within ProtoGen.exe.
+- Upgraded to protoc.exe (2.3) compiler.
+
+Fixes:
+- Issue 9: Class cannot be static and sealed error
+- Issue 12: default value for enumerate fields must be filled out
+
+Other:
+- Rewrite of build using MSBbuild instead of NAnt
+- Moved to NUnit Version 2.2.8.0
+- Changed to using secure .snk for releases
+
+===============================================================================
+RELEASE NOTES - Version 0.9.1
+===============================================================================
+
+Fixes:
+- issue 10: Incorrect encoding of packed fields when serialized
+
+===============================================================================
+RELEASE NOTES - Version 0.9.0
+===============================================================================
+
+- Initial release
+
+===============================================================================
\ No newline at end of file
diff --git a/build/Build.bat b/build/Build.bat
index 3269d54..2b246ca 100644
--- a/build/Build.bat
+++ b/build/Build.bat
@@ -1,10 +1,10 @@
-@echo off
-SET BUILD_TARGET=%1
-SET BUILD_CONFIG=%2
-
-IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
-IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
-
-CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj %3 %4 %5 %6 /t:%BUILD_TARGET% /p:BuildConfiguration=%BUILD_CONFIG% /p:Platform="Any CPU" /p:BuildTools=4.0 /toolsversion:4.0"
-
+@echo off
+SET BUILD_TARGET=%1
+SET BUILD_CONFIG=%2
+
+IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
+IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
+
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj %3 %4 %5 %6 /t:%BUILD_TARGET% /p:BuildConfiguration=%BUILD_CONFIG% /p:Platform="Any CPU" /p:BuildTools=4.0 /toolsversion:4.0"
+
pause
\ No newline at end of file
diff --git a/build/BuildAll.bat b/build/BuildAll.bat
index 984fb79..e80ac8d 100644
--- a/build/BuildAll.bat
+++ b/build/BuildAll.bat
@@ -1,42 +1,42 @@
-@ECHO OFF
-
-SET PREV_WORKING_DIR=%CD%
-CD %~dp0
-
-REM -- 3.5 Debug build, ensure this continues to work
-%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.csproj /t:Rebuild /p:BuildConfiguration=Debug /p:Platform="Any CPU" /p:BuildTools=3.5 /toolsversion:3.5"
-IF ERRORLEVEL 1 GOTO ERROR
-
-REM -- 4.0 Debug build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Debug /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-REM -- 4.0 Release build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Release /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-IF EXIST "%ProgramFiles%\MSBuild\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" GOTO SILVERLIGHT
-IF EXIST "%ProgramFiles(x86)%\MSBuild\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" GOTO SILVERLIGHT
-
-ECHO Unable to locate %ProgramFiles(x86)%\MSBuild\Microsoft\Silverlight\v2.0
-GOTO ERROR
-
-:SILVERLIGHT
-
-REM -- 4.0 Debug_Silverlight2 build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-REM -- 4.0 Release_Silverlight2 build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-GOTO END
-
-:ERROR
-CD %PREV_WORKING_DIR%
-PAUSE
-
-:END
-CD %PREV_WORKING_DIR%
+@ECHO OFF
+
+SET PREV_WORKING_DIR=%CD%
+CD %~dp0
+
+REM -- 3.5 Debug build, ensure this continues to work
+%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.csproj /t:Rebuild /p:BuildConfiguration=Debug /p:Platform="Any CPU" /p:BuildTools=3.5 /toolsversion:3.5"
+IF ERRORLEVEL 1 GOTO ERROR
+
+REM -- 4.0 Debug build
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Debug /p:Platform="Any CPU"
+IF ERRORLEVEL 1 GOTO ERROR
+
+REM -- 4.0 Release build
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Release /p:Platform="Any CPU"
+IF ERRORLEVEL 1 GOTO ERROR
+
+IF EXIST "%ProgramFiles%\MSBuild\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" GOTO SILVERLIGHT
+IF EXIST "%ProgramFiles(x86)%\MSBuild\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" GOTO SILVERLIGHT
+
+ECHO Unable to locate %ProgramFiles(x86)%\MSBuild\Microsoft\Silverlight\v2.0
+GOTO ERROR
+
+:SILVERLIGHT
+
+REM -- 4.0 Debug_Silverlight2 build
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
+IF ERRORLEVEL 1 GOTO ERROR
+
+REM -- 4.0 Release_Silverlight2 build
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
+IF ERRORLEVEL 1 GOTO ERROR
+
+GOTO END
+
+:ERROR
+CD %PREV_WORKING_DIR%
+PAUSE
+
+:END
+CD %PREV_WORKING_DIR%
SET PREV_WORKING_DIR=
\ No newline at end of file
diff --git a/build/BuildSilverlight2.bat b/build/BuildSilverlight2.bat
index bc1dd21..1baccac 100644
--- a/build/BuildSilverlight2.bat
+++ b/build/BuildSilverlight2.bat
@@ -1,5 +1,5 @@
-@echo off
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
-
+@echo off
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
+
pause
\ No newline at end of file
diff --git a/build/GenerateCompletePackage.bat b/build/GenerateCompletePackage.bat
index 6aa3b37..e281596 100644
--- a/build/GenerateCompletePackage.bat
+++ b/build/GenerateCompletePackage.bat
@@ -1,19 +1,19 @@
-@ECHO OFF
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=AllBinariesAndSource.zip /p:Platform="Any CPU"
-
+@ECHO OFF
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=AllBinariesAndSource.zip /p:Platform="Any CPU"
+
:END
\ No newline at end of file
diff --git a/build/GenerateReleasePackage.bat b/build/GenerateReleasePackage.bat
index 921de95..bd2a7f8 100644
--- a/build/GenerateReleasePackage.bat
+++ b/build/GenerateReleasePackage.bat
@@ -1,13 +1,13 @@
-@ECHO OFF
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=ReleaseBinaries.zip /p:Platform="Any CPU"
-
+@ECHO OFF
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
+IF ERRORLEVEL 1 GOTO END
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=ReleaseBinaries.zip /p:Platform="Any CPU"
+
:END
\ No newline at end of file
diff --git a/build/RunBenchmarks.bat b/build/RunBenchmarks.bat
index 863eafa..5a32f3f 100644
--- a/build/RunBenchmarks.bat
+++ b/build/RunBenchmarks.bat
@@ -1,5 +1,5 @@
-@echo off
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild %~dp0\build.csproj /m /t:RunBenchmarks /p:BuildConfiguration=Release /p:Platform="Any CPU"
-
+@echo off
+
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild %~dp0\build.csproj /m /t:RunBenchmarks /p:BuildConfiguration=Release /p:Platform="Any CPU"
+
pause
\ No newline at end of file
diff --git a/build/build35.bat b/build/build35.bat
index 87729d8..02f803b 100644
--- a/build/build35.bat
+++ b/build/build35.bat
@@ -1,8 +1,8 @@
-@echo off
-SET BUILD_TARGET=%1
-SET BUILD_CONFIG=%2
-
-IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
-IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
-
-CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.csproj %3 %4 %5 %6 /t:%BUILD_TARGET% /p:BuildConfiguration=%BUILD_CONFIG% /p:Platform="Any CPU" /p:BuildTools=3.5 /toolsversion:3.5"
+@echo off
+SET BUILD_TARGET=%1
+SET BUILD_CONFIG=%2
+
+IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
+IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
+
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.csproj %3 %4 %5 %6 /t:%BUILD_TARGET% /p:BuildConfiguration=%BUILD_CONFIG% /p:Platform="Any CPU" /p:BuildTools=3.5 /toolsversion:3.5"
diff --git a/license.txt b/license.txt
index b8e773b..2715f7b 100644
--- a/license.txt
+++ b/license.txt
@@ -1,31 +1,31 @@
-Protocol Buffers - Google's data interchange format
-Copyright 2008-2010 Google Inc. All rights reserved.
-http://github.com/jskeet/dotnet-protobufs/
-Original C++/Java/Python code:
-http://code.google.com/p/protobuf/
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Protocol Buffers - Google's data interchange format
+Copyright 2008-2010 Google Inc. All rights reserved.
+http://github.com/jskeet/dotnet-protobufs/
+Original C++/Java/Python code:
+http://code.google.com/p/protobuf/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/protos/extest/unittest_extras_lite.proto b/protos/extest/unittest_extras_lite.proto
index 46d5ab9..72e7ee8 100644
--- a/protos/extest/unittest_extras_lite.proto
+++ b/protos/extest/unittest_extras_lite.proto
@@ -1,61 +1,62 @@
-// Additional options required for C# generation. File from copyright
-// line onwards is as per original distribution.
-import "google/protobuf/csharp_options.proto";
-option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos";
-option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestExtrasLiteProtoFile";
-
-package protobuf_unittest_extra;
-
-option optimize_for = LITE_RUNTIME;
-
-option java_package = "com.google.protobuf";
-
-message TestRequiredLite {
- required int32 d = 1;
- required ExtraEnum en = 2 [default = DEFAULT];
-}
-
-enum ExtraEnum {
- DEFAULT = 10;
- EXLITE_FOO = 7;
- EXLITE_BAR = 8;
- EXLITE_BAZ = 9;
-}
-
-message TestInteropPersonLite {
- required string name = 1;
- required int32 id = 2;
- optional string email = 3;
- repeated int32 codes = 10 [packed=true];
-
- enum PhoneType {
- MOBILE = 0;
- HOME = 1;
- WORK = 2;
- }
-
- message PhoneNumber {
- required string number = 1;
- optional PhoneType type = 2 [default = HOME];
- }
-
- repeated PhoneNumber phone = 4;
-
- repeated group Addresses = 5 {
- required string address = 1;
- optional string address2 = 2;
- required string city = 3;
- required string state = 4;
- required fixed32 zip = 5;
- }
-
- extensions 100 to 199;
-}
-
-message TestInteropEmployeeIdLite {
- required string number = 1;
-}
-
-extend TestInteropPersonLite {
- required TestInteropEmployeeIdLite employee_id_lite = 126;
-}
+// Additional options required for C# generation. File from copyright
+// line onwards is as per original distribution.
+import "google/protobuf/csharp_options.proto";
+option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos";
+option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestExtrasLiteProtoFile";
+option (google.protobuf.csharp_file_options).add_serializable = true;
+
+package protobuf_unittest_extra;
+
+option optimize_for = LITE_RUNTIME;
+
+option java_package = "com.google.protobuf";
+
+message TestRequiredLite {
+ required int32 d = 1;
+ required ExtraEnum en = 2 [default = DEFAULT];
+}
+
+enum ExtraEnum {
+ DEFAULT = 10;
+ EXLITE_FOO = 7;
+ EXLITE_BAR = 8;
+ EXLITE_BAZ = 9;
+}
+
+message TestInteropPersonLite {
+ required string name = 1;
+ required int32 id = 2;
+ optional string email = 3;
+ repeated int32 codes = 10 [packed=true];
+
+ enum PhoneType {
+ MOBILE = 0;
+ HOME = 1;
+ WORK = 2;
+ }
+
+ message PhoneNumber {
+ required string number = 1;
+ optional PhoneType type = 2 [default = HOME];
+ }
+
+ repeated PhoneNumber phone = 4;
+
+ repeated group Addresses = 5 {
+ required string address = 1;
+ optional string address2 = 2;
+ required string city = 3;
+ required string state = 4;
+ required fixed32 zip = 5;
+ }
+
+ extensions 100 to 199;
+}
+
+message TestInteropEmployeeIdLite {
+ required string number = 1;
+}
+
+extend TestInteropPersonLite {
+ required TestInteropEmployeeIdLite employee_id_lite = 126;
+}
diff --git a/protos/extest/unittest_extras_xmltest.proto b/protos/extest/unittest_extras_xmltest.proto
index f00fb02..ab8088a 100644
--- a/protos/extest/unittest_extras_xmltest.proto
+++ b/protos/extest/unittest_extras_xmltest.proto
@@ -1,52 +1,51 @@
import "google/protobuf/csharp_options.proto";
option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos";
option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestXmlSerializerTestProtoFile";
+option (google.protobuf.csharp_file_options).add_serializable = true;
package protobuf_unittest_extra;
option optimize_for = SPEED;
enum EnumOptions {
- ONE = 0;
- TWO = 1;
- THREE = 2;
+ ONE = 0;
+ TWO = 1;
+ THREE = 2;
}
-message TestXmlChild
-{
- repeated EnumOptions options = 3;
- optional bytes binary = 4;
+message TestXmlChild {
+ repeated EnumOptions options = 3;
+ optional bytes binary = 4;
}
message TestXmlNoFields {
}
message TestXmlRescursive {
- optional TestXmlRescursive child = 1;
+ optional TestXmlRescursive child = 1;
}
message TestXmlMessage {
- optional int64 number = 6;
- repeated int32 numbers = 2;
- optional string text = 3;
- repeated string textlines = 700;
- optional bool valid = 5;
-
- optional TestXmlChild child = 1;
- repeated group Children = 401
- {
- repeated EnumOptions options = 3;
- optional bytes binary = 4;
- }
+ optional int64 number = 6;
+ repeated int32 numbers = 2;
+ optional string text = 3;
+ repeated string textlines = 700;
+ optional bool valid = 5;
- extensions 100 to 199;
+ optional TestXmlChild child = 1;
+ repeated group Children = 401 {
+ repeated EnumOptions options = 3;
+ optional bytes binary = 4;
+ }
+
+extensions 100 to 199;
}
message TestXmlExtension {
required int32 number = 1;
}
-
+
extend TestXmlMessage {
optional EnumOptions extension_enum = 101;
optional string extension_text = 102;
diff --git a/protos/extest/unittest_issues.proto b/protos/extest/unittest_issues.proto
index 21b5566..5e0da0a 100644
--- a/protos/extest/unittest_issues.proto
+++ b/protos/extest/unittest_issues.proto
@@ -95,3 +95,38 @@
message MyMessageBReferenceA {
required MyMessageAReferenceB value = 1;
}
+
+// issue 19 - negative enum values
+
+enum NegativeEnum {
+ FiveBelow = -5;
+ MinusOne = -1;
+ Zero = 0;
+}
+
+message NegativeEnumMessage {
+ optional NegativeEnum value = 1;
+ repeated NegativeEnum values = 2;
+ repeated NegativeEnum packed_values = 3 [packed=true];
+}
+
+// Issue 21: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=21
+// Decorate fields with [deprecated=true] as [System.Obsolete]
+
+message DeprecatedChild {
+}
+
+enum DeprecatedEnum {
+ one = 1;
+}
+
+message DeprecatedFieldsMessage {
+ optional int32 PrimitiveValue = 1 [deprecated = true];
+ repeated int32 PrimitiveArray = 2 [deprecated = true];
+
+ optional DeprecatedChild MessageValue = 3 [deprecated = true];
+ repeated DeprecatedChild MessageArray = 4 [deprecated = true];
+
+ optional DeprecatedEnum EnumValue = 5 [deprecated = true];
+ repeated DeprecatedEnum EnumArray = 6 [deprecated = true];
+}
\ No newline at end of file
diff --git a/protos/google/protobuf/csharp_options.proto b/protos/google/protobuf/csharp_options.proto
index 33a7b03..9ebcfa6 100644
--- a/protos/google/protobuf/csharp_options.proto
+++ b/protos/google/protobuf/csharp_options.proto
@@ -38,6 +38,9 @@
// Generate attributes indicating non-CLS-compliance
optional bool cls_compliance = 8 [default = true];
+
+ // Generate messages/builders with the [Serializable] attribute
+ optional bool add_serializable = 9 [default = false];
// The extension that should be appended to the umbrella_classname when creating files.
optional string file_extension = 221 [default = ".cs"];
diff --git a/protos/npp.language.xml b/protos/npp.language.xml
new file mode 100644
index 0000000..c612218
--- /dev/null
+++ b/protos/npp.language.xml
@@ -0,0 +1,44 @@
+<NotepadPlus>
+<!--
+Defines syntax highlighting for Notepad++.
+1. Install Notepad++ from http://notepad-plus-plus.org
+2. Open Notepad++, from the View menu, select "User-Defined Dialog..."
+3. Click the "Import..." button and select this file
+4. Restart Notepad++
+5. Open and edit any *.proto file
+-->
+ <UserLang name="Proto Buffer" ext="proto">
+ <Settings>
+ <Global caseIgnored="no" />
+ <TreatAsSymbol comment="no" commentLine="yes" />
+ <Prefix words1="no" words2="no" words3="no" words4="yes" />
+ </Settings>
+ <KeywordLists>
+ <Keywords name="Delimiters">[00]00</Keywords>
+ <Keywords name="Folder+">{</Keywords>
+ <Keywords name="Folder-">}</Keywords>
+ <Keywords name="Operators">=</Keywords>
+ <Keywords name="Comment"> 1option 1package 1import 2; 0//</Keywords>
+ <Keywords name="Words1">message enum service extend</Keywords>
+ <Keywords name="Words2">required optional repeated extensions to rpc returns</Keywords>
+ <Keywords name="Words3">double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes</Keywords>
+ <Keywords name="Words4"></Keywords>
+ </KeywordLists>
+ <Styles>
+ <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontStyle="1" />
+ <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontStyle="1" />
+ <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="KEYWORD2" styleID="6" fgColor="0080C0" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="KEYWORD3" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="KEYWORD4" styleID="8" fgColor="008040" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="COMMENT LINE" styleID="2" fgColor="949494" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="NUMBER" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="DELIMINER1" styleID="14" fgColor="800080" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="DELIMINER2" styleID="15" fgColor="808080" bgColor="FFFFFF" fontStyle="0" />
+ <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
+ </Styles>
+ </UserLang>
+</NotepadPlus>
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index 5222884..0000000
--- a/readme.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-Welcome to the C# port of Google Protocol Buffers, written by Jon Skeet
-(skeet@pobox.com) based on the work of many talented people.
-
-For more information about this port, visit its homepage:
-http://protobuf-csharp-port.googlecode.com
-
-For more information about Protocol Buffers in general, visit the
-project page for the C++, Java and Python project:
-http://protobuf.googlecode.com
-
-
-Release 0.9.1
--------------
-
-Fix to release 0.9:
-
-- Include protos in binary download
-- Fix issue 10: incorrect encoding of packed fields when serialized
- size wasn't fetched first
-
-
-Release 0.9
------------
-
-Due to popular demand, I have built a version of the binaries to put
-on the web site. Currently these are set at assembly version 0.9,
-and an assembly file version of 0.9. This should be seen as a mark
-of the readiness of the release process more than the stability of
-the code. As far as I'm aware, the code itself is perfectly fine: I
-certainly have plans for more features particularly around making
-code generation simpler, but you should feel confident about the
-parsing and serialization of messages produced with this version of
-the library. Of course, if you do find any problems, *please* report
-them at the web site.
-
-Currently the downloadable release is built with the snk file which
-is in the open source library. I am considering having a privately
-held key so that you can check that you're building against a
-"blessed" release - feedback on this (and any other aspect of the
-release process) is very welcome.
diff --git a/src/AddressBook/AddressBookProtos.cs b/src/AddressBook/AddressBookProtos.cs
index 92d41ac..7fc1c64 100644
--- a/src/AddressBook/AddressBookProtos.cs
+++ b/src/AddressBook/AddressBookProtos.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -68,6 +68,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Person : pb::GeneratedMessage<Person, Person.Builder> {
+ private Person() { }
private static readonly Person defaultInstance = new Person().MakeReadOnly();
private static readonly string[] _personFieldNames = new string[] { "email", "id", "name", "phone" };
private static readonly uint[] _personFieldTags = new uint[] { 26, 16, 10, 34 };
@@ -108,6 +109,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class PhoneNumber : pb::GeneratedMessage<PhoneNumber, PhoneNumber.Builder> {
+ private PhoneNumber() { }
private static readonly PhoneNumber defaultInstance = new PhoneNumber().MakeReadOnly();
private static readonly string[] _phoneNumberFieldNames = new string[] { "number", "type" };
private static readonly uint[] _phoneNumberFieldTags = new uint[] { 10, 16 };
@@ -660,7 +662,7 @@
Email = other.Email;
}
if (other.phone_.Count != 0) {
- base.AddRange(other.phone_, result.phone_);
+ result.phone_.Add(other.phone_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -828,7 +830,7 @@
}
public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber> values) {
PrepareBuilder();
- base.AddRange(values, result.phone_);
+ result.phone_.Add(values);
return this;
}
public Builder ClearPhone() {
@@ -846,6 +848,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class AddressBook : pb::GeneratedMessage<AddressBook, AddressBook.Builder> {
+ private AddressBook() { }
private static readonly AddressBook defaultInstance = new AddressBook().MakeReadOnly();
private static readonly string[] _addressBookFieldNames = new string[] { "person" };
private static readonly uint[] _addressBookFieldTags = new uint[] { 10 };
@@ -1037,7 +1040,7 @@
if (other == global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.DefaultInstance) return this;
PrepareBuilder();
if (other.person_.Count != 0) {
- base.AddRange(other.person_, result.person_);
+ result.person_.Add(other.person_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -1131,7 +1134,7 @@
}
public Builder AddRangePerson(scg::IEnumerable<global::Google.ProtocolBuffers.Examples.AddressBook.Person> values) {
PrepareBuilder();
- base.AddRange(values, result.person_);
+ result.person_.Add(values);
return this;
}
public Builder ClearPerson() {
diff --git a/src/ProtoGen.Test/DependencyResolutionTest.cs b/src/ProtoGen.Test/DependencyResolutionTest.cs
index 8ac5b34..c4422b8 100644
--- a/src/ProtoGen.Test/DependencyResolutionTest.cs
+++ b/src/ProtoGen.Test/DependencyResolutionTest.cs
@@ -52,7 +52,7 @@
{
FileDescriptorProto first = new FileDescriptorProto.Builder {Name = "First"}.Build();
FileDescriptorProto second = new FileDescriptorProto.Builder {Name = "Second"}.Build();
- FileDescriptorSet set = new FileDescriptorSet {FileList = {first, second}};
+ FileDescriptorSet set = new FileDescriptorSet.Builder { FileList = { first, second } }.Build();
IList<FileDescriptor> converted = Generator.ConvertDescriptors(CSharpFileOptions.DefaultInstance, set);
Assert.AreEqual(2, converted.Count);
@@ -68,7 +68,7 @@
FileDescriptorProto first =
new FileDescriptorProto.Builder {Name = "First", DependencyList = {"Second"}}.Build();
FileDescriptorProto second = new FileDescriptorProto.Builder {Name = "Second"}.Build();
- FileDescriptorSet set = new FileDescriptorSet {FileList = {first, second}};
+ FileDescriptorSet set = new FileDescriptorSet.Builder { FileList = { first, second } }.Build();
IList<FileDescriptor> converted = Generator.ConvertDescriptors(CSharpFileOptions.DefaultInstance, set);
Assert.AreEqual(2, converted.Count);
Assert.AreEqual("First", converted[0].Name);
@@ -84,7 +84,7 @@
FileDescriptorProto first = new FileDescriptorProto.Builder {Name = "First"}.Build();
FileDescriptorProto second =
new FileDescriptorProto.Builder {Name = "Second", DependencyList = {"First"}}.Build();
- FileDescriptorSet set = new FileDescriptorSet {FileList = {first, second}};
+ FileDescriptorSet set = new FileDescriptorSet.Builder { FileList = { first, second } }.Build();
IList<FileDescriptor> converted = Generator.ConvertDescriptors(CSharpFileOptions.DefaultInstance, set);
Assert.AreEqual(2, converted.Count);
Assert.AreEqual("First", converted[0].Name);
@@ -101,7 +101,7 @@
new FileDescriptorProto.Builder {Name = "First", DependencyList = {"Second"}}.Build();
FileDescriptorProto second =
new FileDescriptorProto.Builder {Name = "Second", DependencyList = {"First"}}.Build();
- FileDescriptorSet set = new FileDescriptorSet {FileList = {first, second}};
+ FileDescriptorSet set = new FileDescriptorSet.Builder { FileList = { first, second } }.Build();
try
{
Generator.ConvertDescriptors(CSharpFileOptions.DefaultInstance, set);
@@ -118,7 +118,7 @@
{
FileDescriptorProto first =
new FileDescriptorProto.Builder {Name = "First", DependencyList = {"Second"}}.Build();
- FileDescriptorSet set = new FileDescriptorSet {FileList = {first}};
+ FileDescriptorSet set = new FileDescriptorSet.Builder { FileList = { first } }.Build();
try
{
Generator.ConvertDescriptors(CSharpFileOptions.DefaultInstance, set);
@@ -135,7 +135,7 @@
{
FileDescriptorProto first =
new FileDescriptorProto.Builder {Name = "First", DependencyList = {"First"}}.Build();
- FileDescriptorSet set = new FileDescriptorSet {FileList = {first}};
+ FileDescriptorSet set = new FileDescriptorSet.Builder { FileList = { first } }.Build();
try
{
Generator.ConvertDescriptors(CSharpFileOptions.DefaultInstance, set);
diff --git a/src/ProtoGen/EnumFieldGenerator.cs b/src/ProtoGen/EnumFieldGenerator.cs
index 84e677e..8d70bc6 100644
--- a/src/ProtoGen/EnumFieldGenerator.cs
+++ b/src/ProtoGen/EnumFieldGenerator.cs
@@ -49,10 +49,11 @@
{
writer.WriteLine("private bool has{0};", PropertyName);
writer.WriteLine("private {0} {1}_ = {2};", TypeName, Name, DefaultValue);
+ AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return has{0}; }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
@@ -60,21 +61,23 @@
public void GenerateBuilderMembers(TextGenerator writer)
{
+ AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return result.has{0}; }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}; }}", PropertyName);
writer.WriteLine(" set {{ Set{0}(value); }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Set{0}({1} value) {{", PropertyName, TypeName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" result.{0}_ = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.has{0} = false;", PropertyName);
diff --git a/src/ProtoGen/FieldGeneratorBase.cs b/src/ProtoGen/FieldGeneratorBase.cs
index 5429419..93aee6c 100644
--- a/src/ProtoGen/FieldGeneratorBase.cs
+++ b/src/ProtoGen/FieldGeneratorBase.cs
@@ -251,6 +251,12 @@
}
}
+ protected void AddPublicMemberAttributes(TextGenerator writer)
+ {
+ AddDeprecatedFlag(writer);
+ AddClsComplianceCheck(writer);
+ }
+
protected void AddClsComplianceCheck(TextGenerator writer)
{
if (!Descriptor.IsCLSCompliant && Descriptor.File.CSharpOptions.ClsCompliance)
@@ -259,6 +265,19 @@
}
}
+ protected bool IsObsolete { get { return Descriptor.Options.Deprecated; } }
+
+ /// <summary>
+ /// Writes [global::System.ObsoleteAttribute()] if the member is obsolete
+ /// </summary>
+ protected void AddDeprecatedFlag(TextGenerator writer)
+ {
+ if (IsObsolete)
+ {
+ writer.WriteLine("[global::System.ObsoleteAttribute()]");
+ }
+ }
+
/// <summary>
/// For encodings with fixed sizes, returns that size in bytes. Otherwise
/// returns -1. TODO(jonskeet): Make this less ugly.
diff --git a/src/ProtoGen/MessageFieldGenerator.cs b/src/ProtoGen/MessageFieldGenerator.cs
index a515060..25b58a6 100644
--- a/src/ProtoGen/MessageFieldGenerator.cs
+++ b/src/ProtoGen/MessageFieldGenerator.cs
@@ -49,9 +49,11 @@
{
writer.WriteLine("private bool has{0};", PropertyName);
writer.WriteLine("private {0} {1}_;", TypeName, Name);
+ AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return has{0}; }}", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_ ?? {1}; }}", Name, DefaultValue);
writer.WriteLine("}");
@@ -59,13 +61,16 @@
public void GenerateBuilderMembers(TextGenerator writer)
{
+ AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return result.has{0}; }}", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}; }}", PropertyName);
writer.WriteLine(" set {{ Set{0}(value); }}", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
@@ -73,6 +78,7 @@
writer.WriteLine(" result.{0}_ = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}({1}.Builder builderForValue) {{", PropertyName, TypeName);
AddNullCheck(writer, "builderForValue");
writer.WriteLine(" PrepareBuilder();");
@@ -80,6 +86,7 @@
writer.WriteLine(" result.{0}_ = builderForValue.Build();", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Merge{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
@@ -93,6 +100,7 @@
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.has{0} = false;", PropertyName);
diff --git a/src/ProtoGen/MessageGenerator.cs b/src/ProtoGen/MessageGenerator.cs
index ce12133..e9a037b 100644
--- a/src/ProtoGen/MessageGenerator.cs
+++ b/src/ProtoGen/MessageGenerator.cs
@@ -165,9 +165,13 @@
{
return SourceGenerators.CreateFieldGenerator(fieldDescriptor, FieldOrdinal(fieldDescriptor));
}
-
+
public void Generate(TextGenerator writer)
{
+ if (Descriptor.File.CSharpOptions.AddSerializable)
+ {
+ writer.WriteLine("[global::System.SerializableAttribute()]");
+ }
writer.WriteLine("[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]");
writer.WriteLine("[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]");
writer.WriteLine("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{0}\", \"{1}\")]",
@@ -177,6 +181,7 @@
Descriptor.Proto.ExtensionRangeCount > 0 ? "Extendable" : "Generated",
RuntimeSuffix);
writer.Indent();
+ writer.WriteLine("private {0}() {{ }}", ClassName);
// Must call BuildPartial() to make sure all lists are made read-only
writer.WriteLine("private static readonly {0} defaultInstance = new {0}().MakeReadOnly();", ClassName);
@@ -565,6 +570,10 @@
writer.WriteLine(" return new Builder(prototype);");
writer.WriteLine("}");
writer.WriteLine();
+ if (Descriptor.File.CSharpOptions.AddSerializable)
+ {
+ writer.WriteLine("[global::System.SerializableAttribute()]");
+ }
writer.WriteLine("[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]");
writer.WriteLine("[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]");
writer.WriteLine("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{0}\", \"{1}\")]",
diff --git a/src/ProtoGen/PrimitiveFieldGenerator.cs b/src/ProtoGen/PrimitiveFieldGenerator.cs
index b9aee86..69e0d4d 100644
--- a/src/ProtoGen/PrimitiveFieldGenerator.cs
+++ b/src/ProtoGen/PrimitiveFieldGenerator.cs
@@ -50,10 +50,11 @@
{
writer.WriteLine("private bool has{0};", PropertyName);
writer.WriteLine("private {0} {1}_{2};", TypeName, Name, HasDefaultValue ? " = " + DefaultValue : "");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return has{0}; }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
@@ -61,15 +62,16 @@
public void GenerateBuilderMembers(TextGenerator writer)
{
+ AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return result.has{0}; }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}; }}", PropertyName);
writer.WriteLine(" set {{ Set{0}(value); }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Set{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
@@ -77,6 +79,7 @@
writer.WriteLine(" result.{0}_ = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.has{0} = false;", PropertyName);
diff --git a/src/ProtoGen/RepeatedEnumFieldGenerator.cs b/src/ProtoGen/RepeatedEnumFieldGenerator.cs
index c7b4f29..8c9f17b 100644
--- a/src/ProtoGen/RepeatedEnumFieldGenerator.cs
+++ b/src/ProtoGen/RepeatedEnumFieldGenerator.cs
@@ -52,15 +52,18 @@
writer.WriteLine("private int {0}MemoizedSerializedSize;", Name);
}
writer.WriteLine("private pbc::PopsicleList<{0}> {1}_ = new pbc::PopsicleList<{0}>();", TypeName, Name);
+ AddDeprecatedFlag(writer);
writer.WriteLine("public scg::IList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return pbc::Lists.AsReadOnly({0}_); }}", Name);
writer.WriteLine("}");
// TODO(jonskeet): Redundant API calls? Possibly - include for portability though. Maybe create an option.
+ AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return {0}_.Count; }}", Name);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return {0}_[index];", Name);
writer.WriteLine("}");
@@ -70,30 +73,37 @@
{
// Note: We can return the original list here, because we make it unmodifiable when we build
// We return it via IPopsicleList so that collection initializers work more pleasantly.
+ AddDeprecatedFlag(writer);
writer.WriteLine("public pbc::IPopsicleList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return PrepareBuilder().{0}_; }}", Name);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return result.{0}Count; }}", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return result.Get{0}(index);", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}(int index, {1} value) {{", PropertyName, TypeName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_[index] = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Add{0}({1} value) {{", PropertyName, TypeName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_.Add(value);", Name, TypeName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
writer.WriteLine(" PrepareBuilder();");
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_.Clear();", Name);
@@ -104,7 +114,7 @@
public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}
diff --git a/src/ProtoGen/RepeatedMessageFieldGenerator.cs b/src/ProtoGen/RepeatedMessageFieldGenerator.cs
index f91895c..a9a0143 100644
--- a/src/ProtoGen/RepeatedMessageFieldGenerator.cs
+++ b/src/ProtoGen/RepeatedMessageFieldGenerator.cs
@@ -48,15 +48,18 @@
public void GenerateMembers(TextGenerator writer)
{
writer.WriteLine("private pbc::PopsicleList<{0}> {1}_ = new pbc::PopsicleList<{0}>();", TypeName, Name);
+ AddDeprecatedFlag(writer);
writer.WriteLine("public scg::IList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
// TODO(jonskeet): Redundant API calls? Possibly - include for portability though. Maybe create an option.
+ AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return {0}_.Count; }}", Name);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return {0}_[index];", Name);
writer.WriteLine("}");
@@ -66,15 +69,19 @@
{
// Note: We can return the original list here, because we make it unmodifiable when we build
// We return it via IPopsicleList so that collection initializers work more pleasantly.
+ AddDeprecatedFlag(writer);
writer.WriteLine("public pbc::IPopsicleList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return PrepareBuilder().{0}_; }}", Name);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return result.{0}Count; }}", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return result.Get{0}(index);", PropertyName);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}(int index, {1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
@@ -82,12 +89,14 @@
writer.WriteLine(" return this;");
writer.WriteLine("}");
// Extra overload for builder (just on messages)
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}(int index, {1}.Builder builderForValue) {{", PropertyName, TypeName);
AddNullCheck(writer, "builderForValue");
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_[index] = builderForValue.Build();", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Add{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
@@ -95,17 +104,20 @@
writer.WriteLine(" return this;");
writer.WriteLine("}");
// Extra overload for builder (just on messages)
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Add{0}({1}.Builder builderForValue) {{", PropertyName, TypeName);
AddNullCheck(writer, "builderForValue");
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_.Add(builderForValue.Build());", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
writer.WriteLine(" PrepareBuilder();");
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_.Clear();", Name);
@@ -116,7 +128,7 @@
public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}
diff --git a/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs b/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs
index 88b1bca..b795f3b 100644
--- a/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs
+++ b/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs
@@ -52,17 +52,18 @@
writer.WriteLine("private int {0}MemoizedSerializedSize;", Name);
}
writer.WriteLine("private pbc::PopsicleList<{0}> {1}_ = new pbc::PopsicleList<{0}>();", TypeName, Name);
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public scg::IList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return pbc::Lists.AsReadOnly({0}_); }}", Name);
writer.WriteLine("}");
// TODO(jonskeet): Redundant API calls? Possibly - include for portability though. Maybe create an option.
+ AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return {0}_.Count; }}", Name);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return {0}_[index];", Name);
writer.WriteLine("}");
@@ -72,37 +73,39 @@
{
// Note: We can return the original list here, because we make it unmodifiable when we build
// We return it via IPopsicleList so that collection initializers work more pleasantly.
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public pbc::IPopsicleList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return PrepareBuilder().{0}_; }}", Name);
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return result.{0}Count; }}", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return result.Get{0}(index);", PropertyName);
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Set{0}(int index, {1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_[index] = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Add{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_.Add(value);", Name, TypeName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
- AddClsComplianceCheck(writer);
+ AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
writer.WriteLine(" PrepareBuilder();");
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
+ AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" PrepareBuilder();");
writer.WriteLine(" result.{0}_.Clear();", Name);
@@ -113,7 +116,7 @@
public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}
diff --git a/src/ProtoGen/UmbrellaClassGenerator.cs b/src/ProtoGen/UmbrellaClassGenerator.cs
index 57a7844..e425045 100644
--- a/src/ProtoGen/UmbrellaClassGenerator.cs
+++ b/src/ProtoGen/UmbrellaClassGenerator.cs
@@ -138,8 +138,8 @@
private void WriteIntroduction(TextGenerator writer)
{
- writer.WriteLine("// Generated by {0}. DO NOT EDIT!", this.GetType().Assembly.FullName);
- writer.WriteLine("#pragma warning disable 1591");
+ writer.WriteLine("// Generated by {0}. DO NOT EDIT!", this.GetType().Assembly.FullName);
+ writer.WriteLine("#pragma warning disable 1591, 0612");
writer.WriteLine("#region Designer generated code");
writer.WriteLine();
diff --git a/src/ProtocolBuffers.Test/CodedInputStreamTest.cs b/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
index c3ca0a1..64656b1 100644
--- a/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
+++ b/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
@@ -35,6 +35,7 @@
#endregion
using System;
+using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.TestProtos;
using NUnit.Framework;
@@ -532,5 +533,77 @@
return base.Read(buffer, offset, Math.Min(count, blockSize));
}
}
+
+ enum TestNegEnum { None = 0, Value = -2 }
+
+ [Test]
+ public void TestNegativeEnum()
+ {
+ byte[] bytes = new byte[10] { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01 };
+ CodedInputStream input = CodedInputStream.CreateInstance(bytes);
+ object unk;
+ TestNegEnum val = TestNegEnum.None;
+
+ Assert.IsTrue(input.ReadEnum(ref val, out unk));
+ Assert.IsTrue(input.IsAtEnd);
+ Assert.AreEqual(TestNegEnum.Value, val);
+ }
+
+ [Test]
+ public void TestNegativeEnumPackedArray()
+ {
+ int arraySize = 1 + (10 * 5);
+ int msgSize = 1 + 1 + arraySize;
+ byte[] bytes = new byte[msgSize];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+ output.WritePackedInt32Array(8, "", arraySize, new int[] { 0, -1, -2, -3, -4, -5 });
+
+ Assert.AreEqual(0, output.SpaceLeft);
+
+ CodedInputStream input = CodedInputStream.CreateInstance(bytes);
+ uint tag;
+ string name;
+ Assert.IsTrue(input.ReadTag(out tag, out name));
+
+ List<TestNegEnum> values = new List<TestNegEnum>();
+ ICollection<object> unk;
+ input.ReadEnumArray(tag, name, values, out unk);
+
+ Assert.AreEqual(2, values.Count);
+ Assert.AreEqual(TestNegEnum.None, values[0]);
+ Assert.AreEqual(TestNegEnum.Value, values[1]);
+
+ Assert.IsNotNull(unk);
+ Assert.AreEqual(4, unk.Count);
+ }
+
+ [Test]
+ public void TestNegativeEnumArray()
+ {
+ int arraySize = 1 + 1 + (11 * 5);
+ int msgSize = arraySize;
+ byte[] bytes = new byte[msgSize];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+ output.WriteInt32Array(8, "", new int[] { 0, -1, -2, -3, -4, -5 });
+
+ Assert.AreEqual(0, output.SpaceLeft);
+
+ CodedInputStream input = CodedInputStream.CreateInstance(bytes);
+ uint tag;
+ string name;
+ Assert.IsTrue(input.ReadTag(out tag, out name));
+
+ List<TestNegEnum> values = new List<TestNegEnum>();
+ ICollection<object> unk;
+ input.ReadEnumArray(tag, name, values, out unk);
+
+ Assert.AreEqual(2, values.Count);
+ Assert.AreEqual(TestNegEnum.None, values[0]);
+ Assert.AreEqual(TestNegEnum.Value, values[1]);
+
+ Assert.IsNotNull(unk);
+ Assert.AreEqual(4, unk.Count);
+ }
+
}
}
\ No newline at end of file
diff --git a/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs b/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs
index 3dd2e0c..d041d3f 100644
--- a/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs
+++ b/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs
@@ -34,6 +34,8 @@
#endregion
+using System;
+using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.TestProtos;
using NUnit.Framework;
@@ -288,5 +290,82 @@
Assert.AreEqual(-75123905439571256L,
CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-75123905439571256L)));
}
+
+ [Test]
+ public void TestNegativeEnumNoTag()
+ {
+ Assert.AreEqual(10, CodedOutputStream.ComputeInt32SizeNoTag(-2));
+ Assert.AreEqual(10, CodedOutputStream.ComputeEnumSizeNoTag(-2));
+
+ byte[] bytes = new byte[10];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+ output.WriteEnumNoTag(-2);
+
+ Assert.AreEqual(0, output.SpaceLeft);
+ Assert.AreEqual("FE-FF-FF-FF-FF-FF-FF-FF-FF-01", BitConverter.ToString(bytes));
+ }
+
+ [Test]
+ public void TestNegativeEnumWithTag()
+ {
+ Assert.AreEqual(11, CodedOutputStream.ComputeInt32Size(8, -2));
+ Assert.AreEqual(11, CodedOutputStream.ComputeEnumSize(8, -2));
+
+ byte[] bytes = new byte[11];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+ output.WriteEnum(8, "", -2, -2);
+
+ Assert.AreEqual(0, output.SpaceLeft);
+ //fyi, 0x40 == 0x08 << 3 + 0, field num + wire format shift
+ Assert.AreEqual("40-FE-FF-FF-FF-FF-FF-FF-FF-FF-01", BitConverter.ToString(bytes));
+ }
+
+ [Test]
+ public void TestNegativeEnumArrayPacked()
+ {
+ int arraySize = 1 + (10 * 5);
+ int msgSize = 1 + 1 + arraySize;
+ byte[] bytes = new byte[msgSize];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+ output.WritePackedEnumArray(8, "", arraySize, new int[] { 0, -1, -2, -3, -4, -5 });
+
+ Assert.AreEqual(0, output.SpaceLeft);
+
+ CodedInputStream input = CodedInputStream.CreateInstance(bytes);
+ uint tag;
+ string name;
+ Assert.IsTrue(input.ReadTag(out tag, out name));
+
+ List<int> values = new List<int>();
+ input.ReadInt32Array(tag, name, values);
+
+ Assert.AreEqual(6, values.Count);
+ for (int i = 0; i > -6; i--)
+ Assert.AreEqual(i, values[Math.Abs(i)]);
+ }
+
+ [Test]
+ public void TestNegativeEnumArray()
+ {
+ int arraySize = 1 + 1 + (11 * 5);
+ int msgSize = arraySize;
+ byte[] bytes = new byte[msgSize];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+ output.WriteEnumArray(8, "", new int[] { 0, -1, -2, -3, -4, -5 });
+
+ Assert.AreEqual(0, output.SpaceLeft);
+
+ CodedInputStream input = CodedInputStream.CreateInstance(bytes);
+ uint tag;
+ string name;
+ Assert.IsTrue(input.ReadTag(out tag, out name));
+
+ List<int> values = new List<int>();
+ input.ReadInt32Array(tag, name, values);
+
+ Assert.AreEqual(6, values.Count);
+ for (int i = 0; i > -6; i--)
+ Assert.AreEqual(i, values[Math.Abs(i)]);
+ }
}
}
\ No newline at end of file
diff --git a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs
index c339cef..35b13a1 100644
--- a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs
+++ b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs
@@ -35,6 +35,7 @@
#endregion
using System;
+using System.Collections.Generic;
using NUnit.Framework;
internal delegate void Action();
@@ -94,6 +95,64 @@
Assert.IsFalse(list.IsReadOnly);
}
+ [Test]
+ public void DoesNotAddNullEnumerable()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ try
+ {
+ list.Add((IEnumerable<string>)null);
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+ [Test]
+ public void DoesNotAddRangeWithNull()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ try
+ {
+ list.Add(new[] { "a", "b", null });
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+ [Test]
+ public void DoesNotAddNull()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ try
+ {
+ list.Add((string)null);
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+ [Test]
+ public void DoesNotSetNull()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ list.Add("a");
+ try
+ {
+ list[0] = null;
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+
private static void AssertNotSupported(Action action)
{
try
diff --git a/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs b/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
new file mode 100644
index 0000000..44e7914
--- /dev/null
+++ b/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using NUnit.Framework;
+using UnitTest.Issues.TestProtos;
+
+namespace Google.ProtocolBuffers
+{
+ [TestFixture]
+ public class DeprecatedMemberTest
+ {
+ private static void AssertIsDeprecated(ICustomAttributeProvider member)
+ {
+ Assert.IsNotNull(member);
+ Assert.IsTrue(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
+ }
+
+ [Test]
+ public void TestDepreatedPrimitiveValue()
+ {
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasPrimitiveValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveValue"));
+
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("HasPrimitiveValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("PrimitiveValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetPrimitiveValue"));
+ }
+ [Test]
+ public void TestDepreatedPrimitiveArray()
+ {
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveArrayList"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveArrayCount"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetMethod("GetPrimitiveArray"));
+
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("PrimitiveArrayList"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("PrimitiveArrayCount"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("GetPrimitiveArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetPrimitiveArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddPrimitiveArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangePrimitiveArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveArray"));
+ }
+ [Test]
+ public void TestDepreatedMessageValue()
+ {
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasMessageValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageValue"));
+
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("HasMessageValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("MessageValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("MergeMessageValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearMessageValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild) }));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild.Builder) }));
+ }
+ [Test]
+ public void TestDepreatedMessageArray()
+ {
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageArrayList"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageArrayCount"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetMethod("GetMessageArray"));
+
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("MessageArrayList"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("MessageArrayCount"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("GetMessageArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageArray", new[] { typeof(int), typeof(DeprecatedChild) }));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageArray", new[] { typeof(int), typeof(DeprecatedChild.Builder) }));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddMessageArray", new[] { typeof(DeprecatedChild) }));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddMessageArray", new[] { typeof(DeprecatedChild.Builder) }));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangeMessageArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearMessageArray"));
+ }
+ [Test]
+ public void TestDepreatedEnumValue()
+ {
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasEnumValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumValue"));
+
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("HasEnumValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("EnumValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearEnumValue"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetEnumValue"));
+ }
+ [Test]
+ public void TestDepreatedEnumArray()
+ {
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumArrayList"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumArrayCount"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetMethod("GetEnumArray"));
+
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("EnumArrayList"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("EnumArrayCount"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("GetEnumArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetEnumArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddEnumArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangeEnumArray"));
+ AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearEnumArray"));
+ }
+ }
+}
diff --git a/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs b/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs
new file mode 100644
index 0000000..b129003
--- /dev/null
+++ b/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Google.ProtocolBuffers.TestProtos;
+using NUnit.Framework;
+
+namespace Google.ProtocolBuffers
+{
+ [TestFixture]
+ public class GeneratedBuilderTest
+ {
+ class OneTimeEnumerator<T> : IEnumerable<T>
+ {
+ readonly T _item;
+ bool _enumerated;
+ public OneTimeEnumerator(T item)
+ {
+ _item = item;
+ }
+ public IEnumerator<T> GetEnumerator()
+ {
+ Assert.IsFalse(_enumerated, "The collection {0} has already been enumerated", GetType());
+ _enumerated = true;
+ yield return _item;
+ }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ { return GetEnumerator(); }
+ }
+
+ [Test]
+ public void DoesNotEnumerateTwiceForMessageList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedForeignMessage(
+ new OneTimeEnumerator<ForeignMessage>(
+ ForeignMessage.DefaultInstance));
+ }
+ [Test]
+ public void DoesNotEnumerateTwiceForPrimitiveList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedInt32(new OneTimeEnumerator<int>(1));
+ }
+ [Test]
+ public void DoesNotEnumerateTwiceForStringList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedString(new OneTimeEnumerator<string>("test"));
+ }
+ [Test]
+ public void DoesNotEnumerateTwiceForEnumList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedForeignEnum(new OneTimeEnumerator<ForeignEnum>(ForeignEnum.FOREIGN_BAR));
+ }
+
+ private static void AssertThrows<T>(System.Threading.ThreadStart method) where T : Exception
+ {
+ try
+ {
+ method();
+ }
+ catch (Exception error)
+ {
+ if (error is T)
+ return;
+ throw;
+ }
+ Assert.Fail("Expected exception of type " + typeof(T));
+ }
+
+ [Test]
+ public void DoesNotAddNullToMessageListByAddRange()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRangeRepeatedForeignMessage(new ForeignMessage[] { null })
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToMessageListByAdd()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRepeatedForeignMessage((ForeignMessage)null)
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToMessageListBySet()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRepeatedForeignMessage(ForeignMessage.DefaultInstance);
+ AssertThrows<ArgumentNullException>(
+ () => b.SetRepeatedForeignMessage(0, (ForeignMessage)null)
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToStringListByAddRange()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRangeRepeatedString(new String[] { null })
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToStringListByAdd()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRepeatedString(null)
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToStringListBySet()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRepeatedString("one");
+ AssertThrows<ArgumentNullException>(
+ () => b.SetRepeatedString(0, null)
+ );
+ }
+ }
+}
diff --git a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
index b1a7e55..83d2ff5 100644
--- a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
+++ b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
@@ -45,9 +45,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- <DocumentationFile>bin\Debug\Google.ProtocolBuffers.Test.XML</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -57,9 +55,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- <DocumentationFile>bin\Release\Google.ProtocolBuffers.Test.XML</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
@@ -93,10 +89,12 @@
<Compile Include="Compatibility\TextCompatibilityTests.cs" />
<Compile Include="Compatibility\XmlCompatibilityTests.cs" />
<Compile Include="CSharpOptionsTest.cs" />
+ <Compile Include="DeprecatedMemberTest.cs" />
<Compile Include="DescriptorsTest.cs" />
<Compile Include="Descriptors\MessageDescriptorTest.cs" />
<Compile Include="DynamicMessageTest.cs" />
<Compile Include="ExtendableMessageTest.cs" />
+ <Compile Include="GeneratedBuilderTest.cs" />
<Compile Include="GeneratedMessageTest.cs" />
<Compile Include="MessageStreamIteratorTest.cs" />
<Compile Include="MessageStreamWriterTest.cs" />
@@ -106,7 +104,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReflectionTester.cs" />
<Compile Include="ReusableBuilderTest.cs" />
+ <Compile Include="SerializableTest.cs" />
<Compile Include="ServiceTest.cs" />
+ <Compile Include="TestCornerCases.cs" />
<Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
<Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
<Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
diff --git a/src/ProtocolBuffers.Test/SerializableTest.cs b/src/ProtocolBuffers.Test/SerializableTest.cs
new file mode 100644
index 0000000..f1073c1
--- /dev/null
+++ b/src/ProtocolBuffers.Test/SerializableTest.cs
@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.Text;
+using Google.ProtocolBuffers.TestProtos;
+using NUnit.Framework;
+
+namespace Google.ProtocolBuffers
+{
+ [TestFixture]
+ public class SerializableTest
+ {
+ /// <summary>
+ /// Just keep it from even compiling if we these objects don't implement the expected interface.
+ /// </summary>
+ public static readonly ISerializable CompileTimeCheckSerializableMessage = TestXmlMessage.DefaultInstance;
+ public static readonly ISerializable CompileTimeCheckSerializableBuilder = new TestXmlMessage.Builder();
+
+ [Test]
+ public void TestPlainMessage()
+ {
+ TestXmlMessage message = TestXmlMessage.CreateBuilder()
+ .SetValid(true)
+ .SetText("text")
+ .AddTextlines("a")
+ .AddTextlines("b")
+ .AddTextlines("c")
+ .SetNumber(0x1010101010)
+ .AddNumbers(1)
+ .AddNumbers(2)
+ .AddNumbers(3)
+ .SetChild(TestXmlChild.CreateBuilder()
+ .AddOptions(EnumOptions.ONE)
+ .SetBinary(ByteString.CopyFrom(new byte[1])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.TWO)
+ .SetBinary(ByteString.CopyFrom(new byte[2])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.THREE)
+ .SetBinary(ByteString.CopyFrom(new byte[3])))
+ .Build();
+
+ MemoryStream ms = new MemoryStream();
+ new BinaryFormatter().Serialize(ms, message);
+
+ ms.Position = 0;
+ TestXmlMessage copy = (TestXmlMessage)new BinaryFormatter().Deserialize(ms);
+
+ Assert.AreEqual(message, copy);
+ }
+
+ [Test]
+ public void TestMessageWithExtensions()
+ {
+ TestXmlMessage message = TestXmlMessage.CreateBuilder()
+ .SetValid(true)
+ .SetText("text")
+ .AddTextlines("a")
+ .AddTextlines("b")
+ .AddTextlines("c")
+ .SetNumber(0x1010101010)
+ .AddNumbers(1)
+ .AddNumbers(2)
+ .AddNumbers(3)
+ .SetChild(TestXmlChild.CreateBuilder()
+ .AddOptions(EnumOptions.ONE)
+ .SetBinary(ByteString.CopyFrom(new byte[1])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.TWO)
+ .SetBinary(ByteString.CopyFrom(new byte[2])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.THREE)
+ .SetBinary(ByteString.CopyFrom(new byte[3])))
+ .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionText, " extension text value ! ")
+ .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionMessage, new TestXmlExtension.Builder().SetNumber(42).Build())
+ .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 100)
+ .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 101)
+ .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 102)
+ .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionEnum, EnumOptions.ONE)
+ .Build();
+
+ ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
+ UnitTestXmlSerializerTestProtoFile.RegisterAllExtensions(registry);
+
+ MemoryStream ms = new MemoryStream();
+ new BinaryFormatter().Serialize(ms, message);
+
+ ms.Position = 0;
+ //you need to provide the extension registry as context to the serializer
+ BinaryFormatter bff = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.All, registry));
+ TestXmlMessage copy = (TestXmlMessage)bff.Deserialize(ms);
+
+ // And all extensions will be defined.
+ Assert.AreEqual(message, copy);
+ }
+
+ [Test]
+ public void TestPlainBuilder()
+ {
+ TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder()
+ .SetValid(true)
+ .SetText("text")
+ .AddTextlines("a")
+ .AddTextlines("b")
+ .AddTextlines("c")
+ .SetNumber(0x1010101010)
+ .AddNumbers(1)
+ .AddNumbers(2)
+ .AddNumbers(3)
+ .SetChild(TestXmlChild.CreateBuilder()
+ .AddOptions(EnumOptions.ONE)
+ .SetBinary(ByteString.CopyFrom(new byte[1])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.TWO)
+ .SetBinary(ByteString.CopyFrom(new byte[2])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.THREE)
+ .SetBinary(ByteString.CopyFrom(new byte[3])))
+ ;
+
+ MemoryStream ms = new MemoryStream();
+ new BinaryFormatter().Serialize(ms, builder);
+
+ ms.Position = 0;
+ TestXmlMessage.Builder copy = (TestXmlMessage.Builder)new BinaryFormatter().Deserialize(ms);
+
+ Assert.AreEqual(builder.Build(), copy.Build());
+ }
+
+ [Test]
+ public void TestBuilderWithExtensions()
+ {
+ TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder()
+ .SetValid(true)
+ .SetText("text")
+ .AddTextlines("a")
+ .AddTextlines("b")
+ .AddTextlines("c")
+ .SetNumber(0x1010101010)
+ .AddNumbers(1)
+ .AddNumbers(2)
+ .AddNumbers(3)
+ .SetChild(TestXmlChild.CreateBuilder()
+ .AddOptions(EnumOptions.ONE)
+ .SetBinary(ByteString.CopyFrom(new byte[1])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.TWO)
+ .SetBinary(ByteString.CopyFrom(new byte[2])))
+ .AddChildren(TestXmlMessage.Types.Children.CreateBuilder()
+ .AddOptions(EnumOptions.THREE)
+ .SetBinary(ByteString.CopyFrom(new byte[3])))
+ .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionText, " extension text value ! ")
+ .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionMessage, new TestXmlExtension.Builder().SetNumber(42).Build())
+ .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 100)
+ .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 101)
+ .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 102)
+ .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionEnum, EnumOptions.ONE)
+ ;
+
+ ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
+ UnitTestXmlSerializerTestProtoFile.RegisterAllExtensions(registry);
+
+ MemoryStream ms = new MemoryStream();
+ new BinaryFormatter().Serialize(ms, builder);
+
+ ms.Position = 0;
+ //you need to provide the extension registry as context to the serializer
+ BinaryFormatter bff = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.All, registry));
+ TestXmlMessage.Builder copy = (TestXmlMessage.Builder)bff.Deserialize(ms);
+
+ // And all extensions will be defined.
+ Assert.AreEqual(builder.Build(), copy.Build());
+ }
+ }
+}
diff --git a/src/ProtocolBuffers.Test/TestCornerCases.cs b/src/ProtocolBuffers.Test/TestCornerCases.cs
new file mode 100644
index 0000000..8a3fe05
--- /dev/null
+++ b/src/ProtocolBuffers.Test/TestCornerCases.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using NUnit.Framework;
+using UnitTest.Issues.TestProtos;
+
+namespace Google.ProtocolBuffers
+{
+ [TestFixture]
+ public class TestCornerCases
+ {
+ [Test]
+ public void TestRoundTripNegativeEnums()
+ {
+ NegativeEnumMessage msg = NegativeEnumMessage.CreateBuilder()
+ .SetValue(NegativeEnum.MinusOne) //11
+ .AddValues(NegativeEnum.Zero) //2
+ .AddValues(NegativeEnum.MinusOne) //11
+ .AddValues(NegativeEnum.FiveBelow) //11
+ //2
+ .AddPackedValues(NegativeEnum.Zero) //1
+ .AddPackedValues(NegativeEnum.MinusOne) //10
+ .AddPackedValues(NegativeEnum.FiveBelow) //10
+ .Build();
+
+ Assert.AreEqual(58, msg.SerializedSize);
+
+ byte[] bytes = new byte[58];
+ CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
+
+ msg.WriteTo(output);
+ Assert.AreEqual(0, output.SpaceLeft);
+
+ NegativeEnumMessage copy = NegativeEnumMessage.ParseFrom(bytes);
+ Assert.AreEqual(msg, copy);
+ }
+ }
+}
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
index e6b39f4..13696c2 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -60,6 +60,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> {
+ private OptionsMessage() { }
private static readonly OptionsMessage defaultInstance = new OptionsMessage().MakeReadOnly();
private static readonly string[] _optionsMessageFieldNames = new string[] { "customized", "normal", "options_message" };
private static readonly uint[] _optionsMessageFieldTags = new uint[] { 26, 10, 18 };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
index c030e0e..93d7fb9 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -400,6 +400,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessageWithCustomOptions : pb::GeneratedMessage<TestMessageWithCustomOptions, TestMessageWithCustomOptions.Builder> {
+ private TestMessageWithCustomOptions() { }
private static readonly TestMessageWithCustomOptions defaultInstance = new TestMessageWithCustomOptions().MakeReadOnly();
private static readonly string[] _testMessageWithCustomOptionsFieldNames = new string[] { "field1" };
private static readonly uint[] _testMessageWithCustomOptionsFieldTags = new uint[] { 10 };
@@ -689,6 +690,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CustomOptionFooRequest : pb::GeneratedMessage<CustomOptionFooRequest, CustomOptionFooRequest.Builder> {
+ private CustomOptionFooRequest() { }
private static readonly CustomOptionFooRequest defaultInstance = new CustomOptionFooRequest().MakeReadOnly();
private static readonly string[] _customOptionFooRequestFieldNames = new string[] { };
private static readonly uint[] _customOptionFooRequestFieldTags = new uint[] { };
@@ -919,6 +921,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CustomOptionFooResponse : pb::GeneratedMessage<CustomOptionFooResponse, CustomOptionFooResponse.Builder> {
+ private CustomOptionFooResponse() { }
private static readonly CustomOptionFooResponse defaultInstance = new CustomOptionFooResponse().MakeReadOnly();
private static readonly string[] _customOptionFooResponseFieldNames = new string[] { };
private static readonly uint[] _customOptionFooResponseFieldTags = new uint[] { };
@@ -1149,6 +1152,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DummyMessageContainingEnum : pb::GeneratedMessage<DummyMessageContainingEnum, DummyMessageContainingEnum.Builder> {
+ private DummyMessageContainingEnum() { }
private static readonly DummyMessageContainingEnum defaultInstance = new DummyMessageContainingEnum().MakeReadOnly();
private static readonly string[] _dummyMessageContainingEnumFieldNames = new string[] { };
private static readonly uint[] _dummyMessageContainingEnumFieldTags = new uint[] { };
@@ -1394,6 +1398,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DummyMessageInvalidAsOptionType : pb::GeneratedMessage<DummyMessageInvalidAsOptionType, DummyMessageInvalidAsOptionType.Builder> {
+ private DummyMessageInvalidAsOptionType() { }
private static readonly DummyMessageInvalidAsOptionType defaultInstance = new DummyMessageInvalidAsOptionType().MakeReadOnly();
private static readonly string[] _dummyMessageInvalidAsOptionTypeFieldNames = new string[] { };
private static readonly uint[] _dummyMessageInvalidAsOptionTypeFieldTags = new uint[] { };
@@ -1624,6 +1629,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CustomOptionMinIntegerValues : pb::GeneratedMessage<CustomOptionMinIntegerValues, CustomOptionMinIntegerValues.Builder> {
+ private CustomOptionMinIntegerValues() { }
private static readonly CustomOptionMinIntegerValues defaultInstance = new CustomOptionMinIntegerValues().MakeReadOnly();
private static readonly string[] _customOptionMinIntegerValuesFieldNames = new string[] { };
private static readonly uint[] _customOptionMinIntegerValuesFieldTags = new uint[] { };
@@ -1854,6 +1860,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CustomOptionMaxIntegerValues : pb::GeneratedMessage<CustomOptionMaxIntegerValues, CustomOptionMaxIntegerValues.Builder> {
+ private CustomOptionMaxIntegerValues() { }
private static readonly CustomOptionMaxIntegerValues defaultInstance = new CustomOptionMaxIntegerValues().MakeReadOnly();
private static readonly string[] _customOptionMaxIntegerValuesFieldNames = new string[] { };
private static readonly uint[] _customOptionMaxIntegerValuesFieldTags = new uint[] { };
@@ -2084,6 +2091,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CustomOptionOtherValues : pb::GeneratedMessage<CustomOptionOtherValues, CustomOptionOtherValues.Builder> {
+ private CustomOptionOtherValues() { }
private static readonly CustomOptionOtherValues defaultInstance = new CustomOptionOtherValues().MakeReadOnly();
private static readonly string[] _customOptionOtherValuesFieldNames = new string[] { };
private static readonly uint[] _customOptionOtherValuesFieldTags = new uint[] { };
@@ -2314,6 +2322,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SettingRealsFromPositiveInts : pb::GeneratedMessage<SettingRealsFromPositiveInts, SettingRealsFromPositiveInts.Builder> {
+ private SettingRealsFromPositiveInts() { }
private static readonly SettingRealsFromPositiveInts defaultInstance = new SettingRealsFromPositiveInts().MakeReadOnly();
private static readonly string[] _settingRealsFromPositiveIntsFieldNames = new string[] { };
private static readonly uint[] _settingRealsFromPositiveIntsFieldTags = new uint[] { };
@@ -2544,6 +2553,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SettingRealsFromNegativeInts : pb::GeneratedMessage<SettingRealsFromNegativeInts, SettingRealsFromNegativeInts.Builder> {
+ private SettingRealsFromNegativeInts() { }
private static readonly SettingRealsFromNegativeInts defaultInstance = new SettingRealsFromNegativeInts().MakeReadOnly();
private static readonly string[] _settingRealsFromNegativeIntsFieldNames = new string[] { };
private static readonly uint[] _settingRealsFromNegativeIntsFieldTags = new uint[] { };
@@ -2774,6 +2784,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ComplexOptionType1 : pb::ExtendableMessage<ComplexOptionType1, ComplexOptionType1.Builder> {
+ private ComplexOptionType1() { }
private static readonly ComplexOptionType1 defaultInstance = new ComplexOptionType1().MakeReadOnly();
private static readonly string[] _complexOptionType1FieldNames = new string[] { "foo", "foo2", "foo3" };
private static readonly uint[] _complexOptionType1FieldTags = new uint[] { 8, 16, 24 };
@@ -3138,6 +3149,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ComplexOptionType2 : pb::ExtendableMessage<ComplexOptionType2, ComplexOptionType2.Builder> {
+ private ComplexOptionType2() { }
private static readonly ComplexOptionType2 defaultInstance = new ComplexOptionType2().MakeReadOnly();
private static readonly string[] _complexOptionType2FieldNames = new string[] { "bar", "baz", "fred" };
private static readonly uint[] _complexOptionType2FieldTags = new uint[] { 10, 16, 26 };
@@ -3170,6 +3182,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ComplexOptionType4 : pb::GeneratedMessage<ComplexOptionType4, ComplexOptionType4.Builder> {
+ private ComplexOptionType4() { }
private static readonly ComplexOptionType4 defaultInstance = new ComplexOptionType4().MakeReadOnly();
private static readonly string[] _complexOptionType4FieldNames = new string[] { "waldo" };
private static readonly uint[] _complexOptionType4FieldTags = new uint[] { 8 };
@@ -3838,6 +3851,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ComplexOptionType3 : pb::GeneratedMessage<ComplexOptionType3, ComplexOptionType3.Builder> {
+ private ComplexOptionType3() { }
private static readonly ComplexOptionType3 defaultInstance = new ComplexOptionType3().MakeReadOnly();
private static readonly string[] _complexOptionType3FieldNames = new string[] { "complexoptiontype5", "qux" };
private static readonly uint[] _complexOptionType3FieldTags = new uint[] { 19, 8 };
@@ -3870,6 +3884,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ComplexOptionType5 : pb::GeneratedMessage<ComplexOptionType5, ComplexOptionType5.Builder> {
+ private ComplexOptionType5() { }
private static readonly ComplexOptionType5 defaultInstance = new ComplexOptionType5().MakeReadOnly();
private static readonly string[] _complexOptionType5FieldNames = new string[] { "plugh" };
private static readonly uint[] _complexOptionType5FieldTags = new uint[] { 24 };
@@ -4460,6 +4475,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ComplexOpt6 : pb::GeneratedMessage<ComplexOpt6, ComplexOpt6.Builder> {
+ private ComplexOpt6() { }
private static readonly ComplexOpt6 defaultInstance = new ComplexOpt6().MakeReadOnly();
private static readonly string[] _complexOpt6FieldNames = new string[] { "xyzzy" };
private static readonly uint[] _complexOpt6FieldTags = new uint[] { 60751608 };
@@ -4733,6 +4749,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class VariousComplexOptions : pb::GeneratedMessage<VariousComplexOptions, VariousComplexOptions.Builder> {
+ private VariousComplexOptions() { }
private static readonly VariousComplexOptions defaultInstance = new VariousComplexOptions().MakeReadOnly();
private static readonly string[] _variousComplexOptionsFieldNames = new string[] { };
private static readonly uint[] _variousComplexOptionsFieldTags = new uint[] { };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
index 47df973..aba049d 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -64,6 +64,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestEmbedOptimizedForSize : pb::GeneratedMessage<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> {
+ private TestEmbedOptimizedForSize() { }
private static readonly TestEmbedOptimizedForSize defaultInstance = new TestEmbedOptimizedForSize().MakeReadOnly();
private static readonly string[] _testEmbedOptimizedForSizeFieldNames = new string[] { "optional_message", "repeated_message" };
private static readonly uint[] _testEmbedOptimizedForSizeFieldTags = new uint[] { 10, 18 };
@@ -277,7 +278,7 @@
MergeOptionalMessage(other.OptionalMessage);
}
if (other.repeatedMessage_.Count != 0) {
- base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
+ result.repeatedMessage_.Add(other.repeatedMessage_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -420,7 +421,7 @@
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedMessage_);
+ result.repeatedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedMessage() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestEmptyProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestEmptyProtoFile.cs
index eb6c6c7..6c5cf36 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestEmptyProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestEmptyProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasIssuesProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasIssuesProtoFile.cs
index 29d784b..be2d202 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasIssuesProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasIssuesProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -30,6 +30,12 @@
internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.MyMessageAReferenceB, global::UnitTest.Issues.TestProtos.MyMessageAReferenceB.Builder> internal__static_unittest_issues_MyMessageAReferenceB__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_unittest_issues_MyMessageBReferenceA__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.MyMessageBReferenceA, global::UnitTest.Issues.TestProtos.MyMessageBReferenceA.Builder> internal__static_unittest_issues_MyMessageBReferenceA__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_unittest_issues_NegativeEnumMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NegativeEnumMessage, global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Builder> internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_unittest_issues_DeprecatedChild__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedChild, global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder> internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage, global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Builder> internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable;
#endregion
#region Descriptor
public static pbd::FileDescriptor Descriptor {
@@ -46,8 +52,22 @@
"UmVmZXJlbmNlQhI0CgV2YWx1ZRgBIAIoCzIlLnVuaXR0ZXN0X2lzc3Vlcy5N" +
"eU1lc3NhZ2VCUmVmZXJlbmNlQSJMChRNeU1lc3NhZ2VCUmVmZXJlbmNlQRI0" +
"CgV2YWx1ZRgBIAIoCzIlLnVuaXR0ZXN0X2lzc3Vlcy5NeU1lc3NhZ2VBUmVm" +
- "ZXJlbmNlQkJASAHCPjsKGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zEh1V" +
- "bml0VGVzdEV4dHJhc0lzc3Vlc1Byb3RvRmlsZQ==");
+ "ZXJlbmNlQiKsAQoTTmVnYXRpdmVFbnVtTWVzc2FnZRIsCgV2YWx1ZRgBIAEo" +
+ "DjIdLnVuaXR0ZXN0X2lzc3Vlcy5OZWdhdGl2ZUVudW0SLQoGdmFsdWVzGAIg" +
+ "AygOMh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bRI4Cg1wYWNrZWRf" +
+ "dmFsdWVzGAMgAygOMh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUIC" +
+ "EAEiEQoPRGVwcmVjYXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVz" +
+ "c2FnZRIaCg5QcmltaXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZl" +
+ "QXJyYXkYAiADKAVCAhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0" +
+ "ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJh" +
+ "eRgEIAMoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgB" +
+ "EjYKCUVudW1WYWx1ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNh" +
+ "dGVkRW51bUICGAESNgoJRW51bUFycmF5GAYgAygOMh8udW5pdHRlc3RfaXNz" +
+ "dWVzLkRlcHJlY2F0ZWRFbnVtQgIYASpHCgxOZWdhdGl2ZUVudW0SFgoJRml2" +
+ "ZUJlbG93EPv//////////wESFQoITWludXNPbmUQ////////////ARIICgRa" +
+ "ZXJvEAAqGQoORGVwcmVjYXRlZEVudW0SBwoDb25lEAFCQEgBwj47ChpVbml0" +
+ "VGVzdC5Jc3N1ZXMuVGVzdFByb3RvcxIdVW5pdFRlc3RFeHRyYXNJc3N1ZXNQ" +
+ "cm90b0ZpbGU=");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_unittest_issues_A__Descriptor = Descriptor.MessageTypes[0];
@@ -74,6 +94,18 @@
internal__static_unittest_issues_MyMessageBReferenceA__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.MyMessageBReferenceA, global::UnitTest.Issues.TestProtos.MyMessageBReferenceA.Builder>(internal__static_unittest_issues_MyMessageBReferenceA__Descriptor,
new string[] { "Value", });
+ internal__static_unittest_issues_NegativeEnumMessage__Descriptor = Descriptor.MessageTypes[6];
+ internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NegativeEnumMessage, global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Builder>(internal__static_unittest_issues_NegativeEnumMessage__Descriptor,
+ new string[] { "Value", "Values", "PackedValues", });
+ internal__static_unittest_issues_DeprecatedChild__Descriptor = Descriptor.MessageTypes[7];
+ internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedChild, global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder>(internal__static_unittest_issues_DeprecatedChild__Descriptor,
+ new string[] { });
+ internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor = Descriptor.MessageTypes[8];
+ internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage, global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Builder>(internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor,
+ new string[] { "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray", });
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
@@ -87,11 +119,29 @@
#endregion
}
+ #region Enums
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public enum NegativeEnum {
+ FiveBelow = -5,
+ MinusOne = -1,
+ Zero = 0,
+ }
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public enum DeprecatedEnum {
+ one = 1,
+ }
+
+ #endregion
+
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class A : pb::GeneratedMessage<A, A.Builder> {
+ private A() { }
private static readonly A defaultInstance = new A().MakeReadOnly();
private static readonly string[] _aFieldNames = new string[] { "_A" };
private static readonly uint[] _aFieldTags = new uint[] { 8 };
@@ -365,6 +415,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class B : pb::GeneratedMessage<B, B.Builder> {
+ private B() { }
private static readonly B defaultInstance = new B().MakeReadOnly();
private static readonly string[] _bFieldNames = new string[] { "B_" };
private static readonly uint[] _bFieldTags = new uint[] { 8 };
@@ -638,6 +689,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class AB : pb::GeneratedMessage<AB, AB.Builder> {
+ private AB() { }
private static readonly AB defaultInstance = new AB().MakeReadOnly();
private static readonly string[] _aBFieldNames = new string[] { "a_b" };
private static readonly uint[] _aBFieldTags = new uint[] { 8 };
@@ -911,6 +963,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NumberField : pb::GeneratedMessage<NumberField, NumberField.Builder> {
+ private NumberField() { }
private static readonly NumberField defaultInstance = new NumberField().MakeReadOnly();
private static readonly string[] _numberFieldFieldNames = new string[] { "_01" };
private static readonly uint[] _numberFieldFieldTags = new uint[] { 8 };
@@ -1188,6 +1241,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class MyMessageAReferenceB : pb::GeneratedMessage<MyMessageAReferenceB, MyMessageAReferenceB.Builder> {
+ private MyMessageAReferenceB() { }
private static readonly MyMessageAReferenceB defaultInstance = new MyMessageAReferenceB().MakeReadOnly();
private static readonly string[] _myMessageAReferenceBFieldNames = new string[] { "value" };
private static readonly uint[] _myMessageAReferenceBFieldTags = new uint[] { 10 };
@@ -1488,6 +1542,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class MyMessageBReferenceA : pb::GeneratedMessage<MyMessageBReferenceA, MyMessageBReferenceA.Builder> {
+ private MyMessageBReferenceA() { }
private static readonly MyMessageBReferenceA defaultInstance = new MyMessageBReferenceA().MakeReadOnly();
private static readonly string[] _myMessageBReferenceAFieldNames = new string[] { "value" };
private static readonly uint[] _myMessageBReferenceAFieldTags = new uint[] { 10 };
@@ -1784,6 +1839,1318 @@
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public sealed partial class NegativeEnumMessage : pb::GeneratedMessage<NegativeEnumMessage, NegativeEnumMessage.Builder> {
+ private NegativeEnumMessage() { }
+ private static readonly NegativeEnumMessage defaultInstance = new NegativeEnumMessage().MakeReadOnly();
+ private static readonly string[] _negativeEnumMessageFieldNames = new string[] { "packed_values", "value", "values" };
+ private static readonly uint[] _negativeEnumMessageFieldTags = new uint[] { 26, 8, 16 };
+ public static NegativeEnumMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NegativeEnumMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NegativeEnumMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_NegativeEnumMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NegativeEnumMessage, NegativeEnumMessage.Builder> InternalFieldAccessors {
+ get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable; }
+ }
+
+ public const int ValueFieldNumber = 1;
+ private bool hasValue;
+ private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.FiveBelow;
+ public bool HasValue {
+ get { return hasValue; }
+ }
+ public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
+ get { return value_; }
+ }
+
+ public const int ValuesFieldNumber = 2;
+ private pbc::PopsicleList<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::PopsicleList<global::UnitTest.Issues.TestProtos.NegativeEnum>();
+ public scg::IList<global::UnitTest.Issues.TestProtos.NegativeEnum> ValuesList {
+ get { return pbc::Lists.AsReadOnly(values_); }
+ }
+ public int ValuesCount {
+ get { return values_.Count; }
+ }
+ public global::UnitTest.Issues.TestProtos.NegativeEnum GetValues(int index) {
+ return values_[index];
+ }
+
+ public const int PackedValuesFieldNumber = 3;
+ private int packedValuesMemoizedSerializedSize;
+ private pbc::PopsicleList<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::PopsicleList<global::UnitTest.Issues.TestProtos.NegativeEnum>();
+ public scg::IList<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValuesList {
+ get { return pbc::Lists.AsReadOnly(packedValues_); }
+ }
+ public int PackedValuesCount {
+ get { return packedValues_.Count; }
+ }
+ public global::UnitTest.Issues.TestProtos.NegativeEnum GetPackedValues(int index) {
+ return packedValues_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ int size = SerializedSize;
+ string[] field_names = _negativeEnumMessageFieldNames;
+ if (hasValue) {
+ output.WriteEnum(1, field_names[1], (int) Value, Value);
+ }
+ if (values_.Count > 0) {
+ output.WriteEnumArray(2, field_names[2], values_);
+ }
+ if (packedValues_.Count > 0) {
+ output.WritePackedEnumArray(3, field_names[0], packedValuesMemoizedSerializedSize, packedValues_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasValue) {
+ size += pb::CodedOutputStream.ComputeEnumSize(1, (int) Value);
+ }
+ {
+ int dataSize = 0;
+ if (values_.Count > 0) {
+ foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in values_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 1 * values_.Count;
+ }
+ }
+ {
+ int dataSize = 0;
+ if (packedValues_.Count > 0) {
+ foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in packedValues_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 1;
+ size += pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize);
+ }
+ packedValuesMemoizedSerializedSize = dataSize;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ }
+
+ public static NegativeEnumMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NegativeEnumMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NegativeEnumMessage MakeReadOnly() {
+ values_.MakeReadOnly();
+ packedValues_.MakeReadOnly();
+ return this;
+ }
+
+ public static Builder CreateBuilder() { return new Builder(); }
+ public override Builder ToBuilder() { return CreateBuilder(this); }
+ public override Builder CreateBuilderForType() { return new Builder(); }
+ public static Builder CreateBuilder(NegativeEnumMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public sealed partial class Builder : pb::GeneratedBuilder<NegativeEnumMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NegativeEnumMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NegativeEnumMessage result;
+
+ private NegativeEnumMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NegativeEnumMessage original = result;
+ result = new NegativeEnumMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NegativeEnumMessage MessageBeingBuilt {
+ get { return PrepareBuilder(); }
+ }
+
+ public override Builder Clear() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ return this;
+ }
+
+ public override Builder Clone() {
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
+ }
+
+ public override pbd::MessageDescriptor DescriptorForType {
+ get { return global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Descriptor; }
+ }
+
+ public override NegativeEnumMessage DefaultInstanceForType {
+ get { return global::UnitTest.Issues.TestProtos.NegativeEnumMessage.DefaultInstance; }
+ }
+
+ public override NegativeEnumMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NegativeEnumMessage) {
+ return MergeFrom((NegativeEnumMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NegativeEnumMessage other) {
+ if (other == global::UnitTest.Issues.TestProtos.NegativeEnumMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasValue) {
+ Value = other.Value;
+ }
+ if (other.values_.Count != 0) {
+ result.values_.Add(other.values_);
+ }
+ if (other.packedValues_.Count != 0) {
+ result.packedValues_.Add(other.packedValues_);
+ }
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_negativeEnumMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _negativeEnumMessageFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 8: {
+ object unknown;
+ if(input.ReadEnum(ref result.value_, out unknown)) {
+ result.hasValue = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(1, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 18:
+ case 16: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::UnitTest.Issues.TestProtos.NegativeEnum>(tag, field_name, result.values_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(2, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ case 26:
+ case 24: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::UnitTest.Issues.TestProtos.NegativeEnum>(tag, field_name, result.packedValues_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(3, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasValue {
+ get { return result.hasValue; }
+ }
+ public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
+ get { return result.Value; }
+ set { SetValue(value); }
+ }
+ public Builder SetValue(global::UnitTest.Issues.TestProtos.NegativeEnum value) {
+ PrepareBuilder();
+ result.hasValue = true;
+ result.value_ = value;
+ return this;
+ }
+ public Builder ClearValue() {
+ PrepareBuilder();
+ result.hasValue = false;
+ result.value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.FiveBelow;
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::UnitTest.Issues.TestProtos.NegativeEnum> ValuesList {
+ get { return PrepareBuilder().values_; }
+ }
+ public int ValuesCount {
+ get { return result.ValuesCount; }
+ }
+ public global::UnitTest.Issues.TestProtos.NegativeEnum GetValues(int index) {
+ return result.GetValues(index);
+ }
+ public Builder SetValues(int index, global::UnitTest.Issues.TestProtos.NegativeEnum value) {
+ PrepareBuilder();
+ result.values_[index] = value;
+ return this;
+ }
+ public Builder AddValues(global::UnitTest.Issues.TestProtos.NegativeEnum value) {
+ PrepareBuilder();
+ result.values_.Add(value);
+ return this;
+ }
+ public Builder AddRangeValues(scg::IEnumerable<global::UnitTest.Issues.TestProtos.NegativeEnum> values) {
+ PrepareBuilder();
+ result.values_.Add(values);
+ return this;
+ }
+ public Builder ClearValues() {
+ PrepareBuilder();
+ result.values_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValuesList {
+ get { return PrepareBuilder().packedValues_; }
+ }
+ public int PackedValuesCount {
+ get { return result.PackedValuesCount; }
+ }
+ public global::UnitTest.Issues.TestProtos.NegativeEnum GetPackedValues(int index) {
+ return result.GetPackedValues(index);
+ }
+ public Builder SetPackedValues(int index, global::UnitTest.Issues.TestProtos.NegativeEnum value) {
+ PrepareBuilder();
+ result.packedValues_[index] = value;
+ return this;
+ }
+ public Builder AddPackedValues(global::UnitTest.Issues.TestProtos.NegativeEnum value) {
+ PrepareBuilder();
+ result.packedValues_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedValues(scg::IEnumerable<global::UnitTest.Issues.TestProtos.NegativeEnum> values) {
+ PrepareBuilder();
+ result.packedValues_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedValues() {
+ PrepareBuilder();
+ result.packedValues_.Clear();
+ return this;
+ }
+ }
+ static NegativeEnumMessage() {
+ object.ReferenceEquals(global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public sealed partial class DeprecatedChild : pb::GeneratedMessage<DeprecatedChild, DeprecatedChild.Builder> {
+ private DeprecatedChild() { }
+ private static readonly DeprecatedChild defaultInstance = new DeprecatedChild().MakeReadOnly();
+ private static readonly string[] _deprecatedChildFieldNames = new string[] { };
+ private static readonly uint[] _deprecatedChildFieldTags = new uint[] { };
+ public static DeprecatedChild DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override DeprecatedChild DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override DeprecatedChild ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedChild__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<DeprecatedChild, DeprecatedChild.Builder> InternalFieldAccessors {
+ get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ int size = SerializedSize;
+ string[] field_names = _deprecatedChildFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ }
+
+ public static DeprecatedChild ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static DeprecatedChild ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static DeprecatedChild ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static DeprecatedChild ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private DeprecatedChild MakeReadOnly() {
+ return this;
+ }
+
+ public static Builder CreateBuilder() { return new Builder(); }
+ public override Builder ToBuilder() { return CreateBuilder(this); }
+ public override Builder CreateBuilderForType() { return new Builder(); }
+ public static Builder CreateBuilder(DeprecatedChild prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public sealed partial class Builder : pb::GeneratedBuilder<DeprecatedChild, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(DeprecatedChild cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private DeprecatedChild result;
+
+ private DeprecatedChild PrepareBuilder() {
+ if (resultIsReadOnly) {
+ DeprecatedChild original = result;
+ result = new DeprecatedChild();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override DeprecatedChild MessageBeingBuilt {
+ get { return PrepareBuilder(); }
+ }
+
+ public override Builder Clear() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ return this;
+ }
+
+ public override Builder Clone() {
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
+ }
+
+ public override pbd::MessageDescriptor DescriptorForType {
+ get { return global::UnitTest.Issues.TestProtos.DeprecatedChild.Descriptor; }
+ }
+
+ public override DeprecatedChild DefaultInstanceForType {
+ get { return global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance; }
+ }
+
+ public override DeprecatedChild BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is DeprecatedChild) {
+ return MergeFrom((DeprecatedChild) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(DeprecatedChild other) {
+ if (other == global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_deprecatedChildFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _deprecatedChildFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+ }
+ static DeprecatedChild() {
+ object.ReferenceEquals(global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public sealed partial class DeprecatedFieldsMessage : pb::GeneratedMessage<DeprecatedFieldsMessage, DeprecatedFieldsMessage.Builder> {
+ private DeprecatedFieldsMessage() { }
+ private static readonly DeprecatedFieldsMessage defaultInstance = new DeprecatedFieldsMessage().MakeReadOnly();
+ private static readonly string[] _deprecatedFieldsMessageFieldNames = new string[] { "EnumArray", "EnumValue", "MessageArray", "MessageValue", "PrimitiveArray", "PrimitiveValue" };
+ private static readonly uint[] _deprecatedFieldsMessageFieldTags = new uint[] { 48, 40, 34, 26, 16, 8 };
+ public static DeprecatedFieldsMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override DeprecatedFieldsMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override DeprecatedFieldsMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<DeprecatedFieldsMessage, DeprecatedFieldsMessage.Builder> InternalFieldAccessors {
+ get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; }
+ }
+
+ public const int PrimitiveValueFieldNumber = 1;
+ private bool hasPrimitiveValue;
+ private int primitiveValue_;
+ [global::System.ObsoleteAttribute()]
+ public bool HasPrimitiveValue {
+ get { return hasPrimitiveValue; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int PrimitiveValue {
+ get { return primitiveValue_; }
+ }
+
+ public const int PrimitiveArrayFieldNumber = 2;
+ private pbc::PopsicleList<int> primitiveArray_ = new pbc::PopsicleList<int>();
+ [global::System.ObsoleteAttribute()]
+ public scg::IList<int> PrimitiveArrayList {
+ get { return pbc::Lists.AsReadOnly(primitiveArray_); }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int PrimitiveArrayCount {
+ get { return primitiveArray_.Count; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int GetPrimitiveArray(int index) {
+ return primitiveArray_[index];
+ }
+
+ public const int MessageValueFieldNumber = 3;
+ private bool hasMessageValue;
+ private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
+ [global::System.ObsoleteAttribute()]
+ public bool HasMessageValue {
+ get { return hasMessageValue; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
+ get { return messageValue_ ?? global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance; }
+ }
+
+ public const int MessageArrayFieldNumber = 4;
+ private pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
+ [global::System.ObsoleteAttribute()]
+ public scg::IList<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArrayList {
+ get { return messageArray_; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int MessageArrayCount {
+ get { return messageArray_.Count; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedChild GetMessageArray(int index) {
+ return messageArray_[index];
+ }
+
+ public const int EnumValueFieldNumber = 5;
+ private bool hasEnumValue;
+ private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.one;
+ [global::System.ObsoleteAttribute()]
+ public bool HasEnumValue {
+ get { return hasEnumValue; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
+ get { return enumValue_; }
+ }
+
+ public const int EnumArrayFieldNumber = 6;
+ private pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
+ [global::System.ObsoleteAttribute()]
+ public scg::IList<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArrayList {
+ get { return pbc::Lists.AsReadOnly(enumArray_); }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int EnumArrayCount {
+ get { return enumArray_.Count; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedEnum GetEnumArray(int index) {
+ return enumArray_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ int size = SerializedSize;
+ string[] field_names = _deprecatedFieldsMessageFieldNames;
+ if (hasPrimitiveValue) {
+ output.WriteInt32(1, field_names[5], PrimitiveValue);
+ }
+ if (primitiveArray_.Count > 0) {
+ output.WriteInt32Array(2, field_names[4], primitiveArray_);
+ }
+ if (hasMessageValue) {
+ output.WriteMessage(3, field_names[3], MessageValue);
+ }
+ if (messageArray_.Count > 0) {
+ output.WriteMessageArray(4, field_names[2], messageArray_);
+ }
+ if (hasEnumValue) {
+ output.WriteEnum(5, field_names[1], (int) EnumValue, EnumValue);
+ }
+ if (enumArray_.Count > 0) {
+ output.WriteEnumArray(6, field_names[0], enumArray_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasPrimitiveValue) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, PrimitiveValue);
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in PrimitiveArrayList) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * primitiveArray_.Count;
+ }
+ if (hasMessageValue) {
+ size += pb::CodedOutputStream.ComputeMessageSize(3, MessageValue);
+ }
+ foreach (global::UnitTest.Issues.TestProtos.DeprecatedChild element in MessageArrayList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(4, element);
+ }
+ if (hasEnumValue) {
+ size += pb::CodedOutputStream.ComputeEnumSize(5, (int) EnumValue);
+ }
+ {
+ int dataSize = 0;
+ if (enumArray_.Count > 0) {
+ foreach (global::UnitTest.Issues.TestProtos.DeprecatedEnum element in enumArray_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 1 * enumArray_.Count;
+ }
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ }
+
+ public static DeprecatedFieldsMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static DeprecatedFieldsMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private DeprecatedFieldsMessage MakeReadOnly() {
+ primitiveArray_.MakeReadOnly();
+ messageArray_.MakeReadOnly();
+ enumArray_.MakeReadOnly();
+ return this;
+ }
+
+ public static Builder CreateBuilder() { return new Builder(); }
+ public override Builder ToBuilder() { return CreateBuilder(this); }
+ public override Builder CreateBuilderForType() { return new Builder(); }
+ public static Builder CreateBuilder(DeprecatedFieldsMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+ public sealed partial class Builder : pb::GeneratedBuilder<DeprecatedFieldsMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(DeprecatedFieldsMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private DeprecatedFieldsMessage result;
+
+ private DeprecatedFieldsMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ DeprecatedFieldsMessage original = result;
+ result = new DeprecatedFieldsMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override DeprecatedFieldsMessage MessageBeingBuilt {
+ get { return PrepareBuilder(); }
+ }
+
+ public override Builder Clear() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ return this;
+ }
+
+ public override Builder Clone() {
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
+ }
+
+ public override pbd::MessageDescriptor DescriptorForType {
+ get { return global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Descriptor; }
+ }
+
+ public override DeprecatedFieldsMessage DefaultInstanceForType {
+ get { return global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.DefaultInstance; }
+ }
+
+ public override DeprecatedFieldsMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is DeprecatedFieldsMessage) {
+ return MergeFrom((DeprecatedFieldsMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(DeprecatedFieldsMessage other) {
+ if (other == global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasPrimitiveValue) {
+ PrimitiveValue = other.PrimitiveValue;
+ }
+ if (other.primitiveArray_.Count != 0) {
+ result.primitiveArray_.Add(other.primitiveArray_);
+ }
+ if (other.HasMessageValue) {
+ MergeMessageValue(other.MessageValue);
+ }
+ if (other.messageArray_.Count != 0) {
+ result.messageArray_.Add(other.messageArray_);
+ }
+ if (other.HasEnumValue) {
+ EnumValue = other.EnumValue;
+ }
+ if (other.enumArray_.Count != 0) {
+ result.enumArray_.Add(other.enumArray_);
+ }
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_deprecatedFieldsMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _deprecatedFieldsMessageFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 8: {
+ result.hasPrimitiveValue = input.ReadInt32(ref result.primitiveValue_);
+ break;
+ }
+ case 18:
+ case 16: {
+ input.ReadInt32Array(tag, field_name, result.primitiveArray_);
+ break;
+ }
+ case 26: {
+ global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder subBuilder = global::UnitTest.Issues.TestProtos.DeprecatedChild.CreateBuilder();
+ if (result.hasMessageValue) {
+ subBuilder.MergeFrom(MessageValue);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ MessageValue = subBuilder.BuildPartial();
+ break;
+ }
+ case 34: {
+ input.ReadMessageArray(tag, field_name, result.messageArray_, global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 40: {
+ object unknown;
+ if(input.ReadEnum(ref result.enumValue_, out unknown)) {
+ result.hasEnumValue = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(5, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 50:
+ case 48: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::UnitTest.Issues.TestProtos.DeprecatedEnum>(tag, field_name, result.enumArray_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(6, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ [global::System.ObsoleteAttribute()]
+ public bool HasPrimitiveValue {
+ get { return result.hasPrimitiveValue; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int PrimitiveValue {
+ get { return result.PrimitiveValue; }
+ set { SetPrimitiveValue(value); }
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetPrimitiveValue(int value) {
+ PrepareBuilder();
+ result.hasPrimitiveValue = true;
+ result.primitiveValue_ = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearPrimitiveValue() {
+ PrepareBuilder();
+ result.hasPrimitiveValue = false;
+ result.primitiveValue_ = 0;
+ return this;
+ }
+
+ [global::System.ObsoleteAttribute()]
+ public pbc::IPopsicleList<int> PrimitiveArrayList {
+ get { return PrepareBuilder().primitiveArray_; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int PrimitiveArrayCount {
+ get { return result.PrimitiveArrayCount; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int GetPrimitiveArray(int index) {
+ return result.GetPrimitiveArray(index);
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetPrimitiveArray(int index, int value) {
+ PrepareBuilder();
+ result.primitiveArray_[index] = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddPrimitiveArray(int value) {
+ PrepareBuilder();
+ result.primitiveArray_.Add(value);
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddRangePrimitiveArray(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.primitiveArray_.Add(values);
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearPrimitiveArray() {
+ PrepareBuilder();
+ result.primitiveArray_.Clear();
+ return this;
+ }
+
+ [global::System.ObsoleteAttribute()]
+ public bool HasMessageValue {
+ get { return result.hasMessageValue; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
+ get { return result.MessageValue; }
+ set { SetMessageValue(value); }
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetMessageValue(global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasMessageValue = true;
+ result.messageValue_ = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetMessageValue(global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasMessageValue = true;
+ result.messageValue_ = builderForValue.Build();
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder MergeMessageValue(global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasMessageValue &&
+ result.messageValue_ != global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance) {
+ result.messageValue_ = global::UnitTest.Issues.TestProtos.DeprecatedChild.CreateBuilder(result.messageValue_).MergeFrom(value).BuildPartial();
+ } else {
+ result.messageValue_ = value;
+ }
+ result.hasMessageValue = true;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearMessageValue() {
+ PrepareBuilder();
+ result.hasMessageValue = false;
+ result.messageValue_ = null;
+ return this;
+ }
+
+ [global::System.ObsoleteAttribute()]
+ public pbc::IPopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArrayList {
+ get { return PrepareBuilder().messageArray_; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int MessageArrayCount {
+ get { return result.MessageArrayCount; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedChild GetMessageArray(int index) {
+ return result.GetMessageArray(index);
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetMessageArray(int index, global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.messageArray_[index] = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetMessageArray(int index, global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.messageArray_[index] = builderForValue.Build();
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddMessageArray(global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.messageArray_.Add(value);
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddMessageArray(global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.messageArray_.Add(builderForValue.Build());
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddRangeMessageArray(scg::IEnumerable<global::UnitTest.Issues.TestProtos.DeprecatedChild> values) {
+ PrepareBuilder();
+ result.messageArray_.Add(values);
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearMessageArray() {
+ PrepareBuilder();
+ result.messageArray_.Clear();
+ return this;
+ }
+
+ [global::System.ObsoleteAttribute()]
+ public bool HasEnumValue {
+ get { return result.hasEnumValue; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
+ get { return result.EnumValue; }
+ set { SetEnumValue(value); }
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetEnumValue(global::UnitTest.Issues.TestProtos.DeprecatedEnum value) {
+ PrepareBuilder();
+ result.hasEnumValue = true;
+ result.enumValue_ = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearEnumValue() {
+ PrepareBuilder();
+ result.hasEnumValue = false;
+ result.enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.one;
+ return this;
+ }
+
+ [global::System.ObsoleteAttribute()]
+ public pbc::IPopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArrayList {
+ get { return PrepareBuilder().enumArray_; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int EnumArrayCount {
+ get { return result.EnumArrayCount; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public global::UnitTest.Issues.TestProtos.DeprecatedEnum GetEnumArray(int index) {
+ return result.GetEnumArray(index);
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetEnumArray(int index, global::UnitTest.Issues.TestProtos.DeprecatedEnum value) {
+ PrepareBuilder();
+ result.enumArray_[index] = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddEnumArray(global::UnitTest.Issues.TestProtos.DeprecatedEnum value) {
+ PrepareBuilder();
+ result.enumArray_.Add(value);
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder AddRangeEnumArray(scg::IEnumerable<global::UnitTest.Issues.TestProtos.DeprecatedEnum> values) {
+ PrepareBuilder();
+ result.enumArray_.Add(values);
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearEnumArray() {
+ PrepareBuilder();
+ result.enumArray_.Clear();
+ return this;
+ }
+ }
+ static DeprecatedFieldsMessage() {
+ object.ReferenceEquals(global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.Descriptor, null);
+ }
+ }
+
#endregion
}
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestGenericServices.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestGenericServices.cs
index 9227c7c..d1fa863 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestGenericServices.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestGenericServices.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs
index 05925a2..a758ba8 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -137,6 +137,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SizeMessage1 : pb::GeneratedMessage<SizeMessage1, SizeMessage1.Builder> {
+ private SizeMessage1() { }
private static readonly SizeMessage1 defaultInstance = new SizeMessage1().MakeReadOnly();
public static SizeMessage1 DefaultInstance {
get { return defaultInstance; }
@@ -932,7 +933,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.field5_);
+ result.field5_.Add(values);
return this;
}
public Builder ClearField5() {
@@ -1554,6 +1555,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SizeMessage1SubMessage : pb::GeneratedMessage<SizeMessage1SubMessage, SizeMessage1SubMessage.Builder> {
+ private SizeMessage1SubMessage() { }
private static readonly SizeMessage1SubMessage defaultInstance = new SizeMessage1SubMessage().MakeReadOnly();
public static SizeMessage1SubMessage DefaultInstance {
get { return defaultInstance; }
@@ -2307,6 +2309,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SizeMessage2 : pb::GeneratedMessage<SizeMessage2, SizeMessage2.Builder> {
+ private SizeMessage2() { }
private static readonly SizeMessage2 defaultInstance = new SizeMessage2().MakeReadOnly();
public static SizeMessage2 DefaultInstance {
get { return defaultInstance; }
@@ -2337,6 +2340,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
+ private Group1() { }
private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
public static Group1 DefaultInstance {
get { return defaultInstance; }
@@ -2742,7 +2746,7 @@
}
public Builder AddRangeField14(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field14_);
+ result.field14_.Add(values);
return this;
}
public Builder ClearField14() {
@@ -2899,7 +2903,7 @@
}
public Builder AddRangeField22(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field22_);
+ result.field22_.Add(values);
return this;
}
public Builder ClearField22() {
@@ -2929,7 +2933,7 @@
}
public Builder AddRangeField73(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.field73_);
+ result.field73_.Add(values);
return this;
}
public Builder ClearField73() {
@@ -3926,7 +3930,7 @@
}
public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1> values) {
PrepareBuilder();
- base.AddRange(values, result.group1_);
+ result.group1_.Add(values);
return this;
}
public Builder ClearGroup1() {
@@ -3958,7 +3962,7 @@
}
public Builder AddRangeField128(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field128_);
+ result.field128_.Add(values);
return this;
}
public Builder ClearField128() {
@@ -4010,7 +4014,7 @@
}
public Builder AddRangeField127(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field127_);
+ result.field127_.Add(values);
return this;
}
public Builder ClearField127() {
@@ -4060,7 +4064,7 @@
}
public Builder AddRangeField130(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.field130_);
+ result.field130_.Add(values);
return this;
}
public Builder ClearField130() {
@@ -4118,6 +4122,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SizeMessage2GroupedMessage : pb::GeneratedMessage<SizeMessage2GroupedMessage, SizeMessage2GroupedMessage.Builder> {
+ private SizeMessage2GroupedMessage() { }
private static readonly SizeMessage2GroupedMessage defaultInstance = new SizeMessage2GroupedMessage().MakeReadOnly();
public static SizeMessage2GroupedMessage DefaultInstance {
get { return defaultInstance; }
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
index 5b70d22..c7e1a93 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -137,6 +137,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SpeedMessage1 : pb::GeneratedMessage<SpeedMessage1, SpeedMessage1.Builder> {
+ private SpeedMessage1() { }
private static readonly SpeedMessage1 defaultInstance = new SpeedMessage1().MakeReadOnly();
private static readonly string[] _speedMessage1FieldNames = new string[] { "field1", "field100", "field101", "field102", "field103", "field104", "field12", "field128", "field129", "field13", "field130", "field131", "field14", "field15", "field150", "field16", "field17", "field18", "field2", "field22", "field23", "field24", "field25", "field271", "field272", "field280", "field29", "field3", "field30", "field4", "field5", "field59", "field6", "field60", "field67", "field68", "field7", "field78", "field80", "field81", "field9" };
private static readonly uint[] _speedMessage1FieldTags = new uint[] { 10, 800, 808, 818, 826, 832, 96, 1024, 1034, 104, 1040, 1048, 112, 122, 1200, 128, 136, 146, 16, 176, 184, 192, 200, 2168, 2176, 2240, 232, 24, 240, 34, 41, 472, 48, 480, 536, 544, 58, 624, 640, 648, 74 };
@@ -1006,7 +1007,7 @@
Field4 = other.Field4;
}
if (other.field5_.Count != 0) {
- base.AddRange(other.field5_, result.field5_);
+ result.field5_.Add(other.field5_);
}
if (other.HasField59) {
Field59 = other.Field59;
@@ -1568,7 +1569,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.field5_);
+ result.field5_.Add(values);
return this;
}
public Builder ClearField5() {
@@ -2190,6 +2191,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SpeedMessage1SubMessage : pb::GeneratedMessage<SpeedMessage1SubMessage, SpeedMessage1SubMessage.Builder> {
+ private SpeedMessage1SubMessage() { }
private static readonly SpeedMessage1SubMessage defaultInstance = new SpeedMessage1SubMessage().MakeReadOnly();
private static readonly string[] _speedMessage1SubMessageFieldNames = new string[] { "field1", "field12", "field13", "field14", "field15", "field16", "field19", "field2", "field20", "field203", "field204", "field205", "field206", "field207", "field21", "field22", "field23", "field28", "field3", "field300" };
private static readonly uint[] _speedMessage1SubMessageFieldTags = new uint[] { 8, 96, 104, 112, 122, 128, 152, 16, 160, 1629, 1632, 1642, 1648, 1656, 169, 176, 184, 224, 24, 2400 };
@@ -3294,6 +3296,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SpeedMessage2 : pb::GeneratedMessage<SpeedMessage2, SpeedMessage2.Builder> {
+ private SpeedMessage2() { }
private static readonly SpeedMessage2 defaultInstance = new SpeedMessage2().MakeReadOnly();
private static readonly string[] _speedMessage2FieldNames = new string[] { "field1", "field109", "field127", "field128", "field129", "field130", "field131", "field2", "field205", "field206", "field21", "field210", "field211", "field212", "field213", "field216", "field217", "field218", "field220", "field221", "field222", "field25", "field3", "field30", "field4", "field6", "field63", "field71", "field75", "group1" };
private static readonly uint[] _speedMessage2FieldTags = new uint[] { 10, 872, 1018, 1026, 1032, 1040, 1048, 18, 1640, 1648, 168, 1680, 1688, 1696, 1704, 1728, 1736, 1744, 1760, 1768, 1781, 205, 24, 240, 32, 50, 504, 568, 600, 83 };
@@ -3326,6 +3329,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
+ private Group1() { }
private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
private static readonly string[] _group1FieldNames = new string[] { "field11", "field12", "field13", "field14", "field15", "field16", "field20", "field22", "field24", "field26", "field27", "field28", "field29", "field31", "field5", "field73" };
private static readonly uint[] _group1FieldTags = new uint[] { 93, 98, 106, 114, 120, 130, 160, 178, 194, 213, 218, 224, 234, 250, 40, 584 };
@@ -3790,7 +3794,7 @@
Field13 = other.Field13;
}
if (other.field14_.Count != 0) {
- base.AddRange(other.field14_, result.field14_);
+ result.field14_.Add(other.field14_);
}
if (other.HasField15) {
Field15 = other.Field15;
@@ -3811,10 +3815,10 @@
Field16 = other.Field16;
}
if (other.field22_.Count != 0) {
- base.AddRange(other.field22_, result.field22_);
+ result.field22_.Add(other.field22_);
}
if (other.field73_.Count != 0) {
- base.AddRange(other.field73_, result.field73_);
+ result.field73_.Add(other.field73_);
}
if (other.HasField20) {
Field20 = other.Field20;
@@ -4053,7 +4057,7 @@
}
public Builder AddRangeField14(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field14_);
+ result.field14_.Add(values);
return this;
}
public Builder ClearField14() {
@@ -4210,7 +4214,7 @@
}
public Builder AddRangeField22(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field22_);
+ result.field22_.Add(values);
return this;
}
public Builder ClearField22() {
@@ -4240,7 +4244,7 @@
}
public Builder AddRangeField73(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.field73_);
+ result.field73_.Add(values);
return this;
}
public Builder ClearField73() {
@@ -5057,22 +5061,22 @@
Field63 = other.Field63;
}
if (other.group1_.Count != 0) {
- base.AddRange(other.group1_, result.group1_);
+ result.group1_.Add(other.group1_);
}
if (other.field128_.Count != 0) {
- base.AddRange(other.field128_, result.field128_);
+ result.field128_.Add(other.field128_);
}
if (other.HasField131) {
Field131 = other.Field131;
}
if (other.field127_.Count != 0) {
- base.AddRange(other.field127_, result.field127_);
+ result.field127_.Add(other.field127_);
}
if (other.HasField129) {
Field129 = other.Field129;
}
if (other.field130_.Count != 0) {
- base.AddRange(other.field130_, result.field130_);
+ result.field130_.Add(other.field130_);
}
if (other.HasField205) {
Field205 = other.Field205;
@@ -5732,7 +5736,7 @@
}
public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1> values) {
PrepareBuilder();
- base.AddRange(values, result.group1_);
+ result.group1_.Add(values);
return this;
}
public Builder ClearGroup1() {
@@ -5764,7 +5768,7 @@
}
public Builder AddRangeField128(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field128_);
+ result.field128_.Add(values);
return this;
}
public Builder ClearField128() {
@@ -5816,7 +5820,7 @@
}
public Builder AddRangeField127(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.field127_);
+ result.field127_.Add(values);
return this;
}
public Builder ClearField127() {
@@ -5866,7 +5870,7 @@
}
public Builder AddRangeField130(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.field130_);
+ result.field130_.Add(values);
return this;
}
public Builder ClearField130() {
@@ -5924,6 +5928,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SpeedMessage2GroupedMessage : pb::GeneratedMessage<SpeedMessage2GroupedMessage, SpeedMessage2GroupedMessage.Builder> {
+ private SpeedMessage2GroupedMessage() { }
private static readonly SpeedMessage2GroupedMessage defaultInstance = new SpeedMessage2GroupedMessage().MakeReadOnly();
private static readonly string[] _speedMessage2GroupedMessageFieldNames = new string[] { "field1", "field10", "field11", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9" };
private static readonly uint[] _speedMessage2GroupedMessageFieldTags = new uint[] { 13, 85, 88, 21, 29, 32, 40, 48, 56, 69, 72 };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
index 3eb3062..f31fdd8 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -43,6 +43,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> {
+ private ImportMessageLite() { }
private static readonly ImportMessageLite defaultInstance = new ImportMessageLite().MakeReadOnly();
private static readonly string[] _importMessageLiteFieldNames = new string[] { "d" };
private static readonly uint[] _importMessageLiteFieldTags = new uint[] { 8 };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
index 6f7f59d..c12aef8 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -71,6 +71,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
+ private ImportMessage() { }
private static readonly ImportMessage defaultInstance = new ImportMessage().MakeReadOnly();
private static readonly string[] _importMessageFieldNames = new string[] { "d" };
private static readonly uint[] _importMessageFieldTags = new uint[] { 8 };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
index 333cb7a..f9cec1a 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -103,6 +103,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessageSet : pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder> {
+ private TestMessageSet() { }
private static readonly TestMessageSet defaultInstance = new TestMessageSet().MakeReadOnly();
private static readonly string[] _testMessageSetFieldNames = new string[] { };
private static readonly uint[] _testMessageSetFieldTags = new uint[] { };
@@ -338,6 +339,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessageSetContainer : pb::GeneratedMessage<TestMessageSetContainer, TestMessageSetContainer.Builder> {
+ private TestMessageSetContainer() { }
private static readonly TestMessageSetContainer defaultInstance = new TestMessageSetContainer().MakeReadOnly();
private static readonly string[] _testMessageSetContainerFieldNames = new string[] { "message_set" };
private static readonly uint[] _testMessageSetContainerFieldTags = new uint[] { 10 };
@@ -636,6 +638,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessageSetExtension1 : pb::GeneratedMessage<TestMessageSetExtension1, TestMessageSetExtension1.Builder> {
+ private TestMessageSetExtension1() { }
private static readonly TestMessageSetExtension1 defaultInstance = new TestMessageSetExtension1().MakeReadOnly();
private static readonly string[] _testMessageSetExtension1FieldNames = new string[] { "i" };
private static readonly uint[] _testMessageSetExtension1FieldTags = new uint[] { 120 };
@@ -911,6 +914,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessageSetExtension2 : pb::GeneratedMessage<TestMessageSetExtension2, TestMessageSetExtension2.Builder> {
+ private TestMessageSetExtension2() { }
private static readonly TestMessageSetExtension2 defaultInstance = new TestMessageSetExtension2().MakeReadOnly();
private static readonly string[] _testMessageSetExtension2FieldNames = new string[] { "str" };
private static readonly uint[] _testMessageSetExtension2FieldTags = new uint[] { 202 };
@@ -1187,6 +1191,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RawMessageSet : pb::GeneratedMessage<RawMessageSet, RawMessageSet.Builder> {
+ private RawMessageSet() { }
private static readonly RawMessageSet defaultInstance = new RawMessageSet().MakeReadOnly();
private static readonly string[] _rawMessageSetFieldNames = new string[] { "item" };
private static readonly uint[] _rawMessageSetFieldTags = new uint[] { 11 };
@@ -1219,6 +1224,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Item : pb::GeneratedMessage<Item, Item.Builder> {
+ private Item() { }
private static readonly Item defaultInstance = new Item().MakeReadOnly();
private static readonly string[] _itemFieldNames = new string[] { "message", "type_id" };
private static readonly uint[] _itemFieldTags = new uint[] { 26, 16 };
@@ -1702,7 +1708,7 @@
if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance) return this;
PrepareBuilder();
if (other.item_.Count != 0) {
- base.AddRange(other.item_, result.item_);
+ result.item_.Add(other.item_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -1796,7 +1802,7 @@
}
public Builder AddRangeItem(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> values) {
PrepareBuilder();
- base.AddRange(values, result.item_);
+ result.item_.Add(values);
return this;
}
public Builder ClearItem() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
index 3d607c8..ba56b14 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -81,6 +81,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> {
+ private TestMessage() { }
private static readonly TestMessage defaultInstance = new TestMessage().MakeReadOnly();
private static readonly string[] _testMessageFieldNames = new string[] { "a" };
private static readonly uint[] _testMessageFieldTags = new uint[] { 8 };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
index b3c24e3..92d965d 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -85,6 +85,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestOptimizedForSize : pb::ExtendableMessage<TestOptimizedForSize, TestOptimizedForSize.Builder> {
+ private TestOptimizedForSize() { }
private static readonly TestOptimizedForSize defaultInstance = new TestOptimizedForSize().MakeReadOnly();
public static TestOptimizedForSize DefaultInstance {
get { return defaultInstance; }
@@ -308,6 +309,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRequiredOptimizedForSize : pb::GeneratedMessage<TestRequiredOptimizedForSize, TestRequiredOptimizedForSize.Builder> {
+ private TestRequiredOptimizedForSize() { }
private static readonly TestRequiredOptimizedForSize defaultInstance = new TestRequiredOptimizedForSize().MakeReadOnly();
public static TestRequiredOptimizedForSize DefaultInstance {
get { return defaultInstance; }
@@ -477,6 +479,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestOptionalOptimizedForSize : pb::GeneratedMessage<TestOptionalOptimizedForSize, TestOptionalOptimizedForSize.Builder> {
+ private TestOptionalOptimizedForSize() { }
private static readonly TestOptionalOptimizedForSize defaultInstance = new TestOptionalOptimizedForSize().MakeReadOnly();
public static TestOptionalOptimizedForSize DefaultInstance {
get { return defaultInstance; }
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
index 0c66d4b..3506495 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -1122,6 +1122,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestAllTypes : pb::GeneratedMessage<TestAllTypes, TestAllTypes.Builder> {
+ private TestAllTypes() { }
private static readonly TestAllTypes defaultInstance = new TestAllTypes().MakeReadOnly();
private static readonly string[] _testAllTypesFieldNames = new string[] { "default_bool", "default_bytes", "default_cord", "default_double", "default_fixed32", "default_fixed64", "default_float", "default_foreign_enum", "default_import_enum", "default_int32", "default_int64", "default_nested_enum", "default_sfixed32", "default_sfixed64", "default_sint32", "default_sint64", "default_string", "default_string_piece", "default_uint32", "default_uint64", "optional_bool", "optional_bytes", "optional_cord", "optional_double", "optional_fixed32", "optional_fixed64", "optional_float", "optional_foreign_enum", "optional_foreign_message", "optional_import_enum", "optional_import_message", "optional_int32", "optional_int64", "optional_nested_enum", "optional_nested_message", "optional_sfixed32", "optional_sfixed64", "optional_sint32", "optional_sint64", "optional_string", "optional_string_piece", "optional_uint32", "optional_uint64", "optionalgroup", "repeated_bool", "repeated_bytes", "repeated_cord", "repeated_double", "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_foreign_enum", "repeated_foreign_message", "repeated_import_enum", "repeated_import_message", "repeated_int32", "repeated_int64", "repeated_nested_enum", "repeated_nested_message", "repeated_sfixed32", "repeated_sfixed64", "repeated_sint32", "repeated_sint64", "repeated_string", "repeated_string_piece", "repeated_uint32", "repeated_uint64", "repeatedgroup" };
private static readonly uint[] _testAllTypesFieldTags = new uint[] { 584, 602, 682, 577, 541, 545, 573, 656, 664, 488, 496, 648, 557, 561, 520, 528, 594, 674, 504, 512, 104, 122, 202, 97, 61, 65, 93, 176, 154, 184, 162, 8, 16, 168, 146, 77, 81, 40, 48, 114, 194, 24, 32, 131, 344, 362, 442, 337, 301, 305, 333, 416, 394, 424, 402, 248, 256, 408, 386, 317, 321, 280, 288, 354, 434, 264, 272, 371 };
@@ -1162,6 +1163,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
private static readonly string[] _nestedMessageFieldNames = new string[] { "bb" };
private static readonly uint[] _nestedMessageFieldTags = new uint[] { 8 };
@@ -1435,6 +1437,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionalGroup : pb::GeneratedMessage<OptionalGroup, OptionalGroup.Builder> {
+ private OptionalGroup() { }
private static readonly OptionalGroup defaultInstance = new OptionalGroup().MakeReadOnly();
private static readonly string[] _optionalGroupFieldNames = new string[] { "a" };
private static readonly uint[] _optionalGroupFieldTags = new uint[] { 136 };
@@ -1708,6 +1711,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RepeatedGroup : pb::GeneratedMessage<RepeatedGroup, RepeatedGroup.Builder> {
+ private RepeatedGroup() { }
private static readonly RepeatedGroup defaultInstance = new RepeatedGroup().MakeReadOnly();
private static readonly string[] _repeatedGroupFieldNames = new string[] { "a" };
private static readonly uint[] _repeatedGroupFieldTags = new uint[] { 376 };
@@ -3466,76 +3470,76 @@
OptionalCord = other.OptionalCord;
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedUint32_.Count != 0) {
- base.AddRange(other.repeatedUint32_, result.repeatedUint32_);
+ result.repeatedUint32_.Add(other.repeatedUint32_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
if (other.repeatedSint32_.Count != 0) {
- base.AddRange(other.repeatedSint32_, result.repeatedSint32_);
+ result.repeatedSint32_.Add(other.repeatedSint32_);
}
if (other.repeatedSint64_.Count != 0) {
- base.AddRange(other.repeatedSint64_, result.repeatedSint64_);
+ result.repeatedSint64_.Add(other.repeatedSint64_);
}
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedSfixed32_.Count != 0) {
- base.AddRange(other.repeatedSfixed32_, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
}
if (other.repeatedSfixed64_.Count != 0) {
- base.AddRange(other.repeatedSfixed64_, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedDouble_.Count != 0) {
- base.AddRange(other.repeatedDouble_, result.repeatedDouble_);
+ result.repeatedDouble_.Add(other.repeatedDouble_);
}
if (other.repeatedBool_.Count != 0) {
- base.AddRange(other.repeatedBool_, result.repeatedBool_);
+ result.repeatedBool_.Add(other.repeatedBool_);
}
if (other.repeatedString_.Count != 0) {
- base.AddRange(other.repeatedString_, result.repeatedString_);
+ result.repeatedString_.Add(other.repeatedString_);
}
if (other.repeatedBytes_.Count != 0) {
- base.AddRange(other.repeatedBytes_, result.repeatedBytes_);
+ result.repeatedBytes_.Add(other.repeatedBytes_);
}
if (other.repeatedGroup_.Count != 0) {
- base.AddRange(other.repeatedGroup_, result.repeatedGroup_);
+ result.repeatedGroup_.Add(other.repeatedGroup_);
}
if (other.repeatedNestedMessage_.Count != 0) {
- base.AddRange(other.repeatedNestedMessage_, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
}
if (other.repeatedForeignMessage_.Count != 0) {
- base.AddRange(other.repeatedForeignMessage_, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
}
if (other.repeatedImportMessage_.Count != 0) {
- base.AddRange(other.repeatedImportMessage_, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
}
if (other.repeatedNestedEnum_.Count != 0) {
- base.AddRange(other.repeatedNestedEnum_, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
}
if (other.repeatedForeignEnum_.Count != 0) {
- base.AddRange(other.repeatedForeignEnum_, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
}
if (other.repeatedImportEnum_.Count != 0) {
- base.AddRange(other.repeatedImportEnum_, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
}
if (other.repeatedStringPiece_.Count != 0) {
- base.AddRange(other.repeatedStringPiece_, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
}
if (other.repeatedCord_.Count != 0) {
- base.AddRange(other.repeatedCord_, result.repeatedCord_);
+ result.repeatedCord_.Add(other.repeatedCord_);
}
if (other.HasDefaultInt32) {
DefaultInt32 = other.DefaultInt32;
@@ -4626,7 +4630,7 @@
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -4656,7 +4660,7 @@
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -4691,7 +4695,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint32_);
+ result.repeatedUint32_.Add(values);
return this;
}
public Builder ClearRepeatedUint32() {
@@ -4726,7 +4730,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -4756,7 +4760,7 @@
}
public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSint32_);
+ result.repeatedSint32_.Add(values);
return this;
}
public Builder ClearRepeatedSint32() {
@@ -4786,7 +4790,7 @@
}
public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSint64_);
+ result.repeatedSint64_.Add(values);
return this;
}
public Builder ClearRepeatedSint64() {
@@ -4821,7 +4825,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -4856,7 +4860,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -4886,7 +4890,7 @@
}
public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed32() {
@@ -4916,7 +4920,7 @@
}
public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed64() {
@@ -4946,7 +4950,7 @@
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -4976,7 +4980,7 @@
}
public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedDouble_);
+ result.repeatedDouble_.Add(values);
return this;
}
public Builder ClearRepeatedDouble() {
@@ -5006,7 +5010,7 @@
}
public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedBool_);
+ result.repeatedBool_.Add(values);
return this;
}
public Builder ClearRepeatedBool() {
@@ -5038,7 +5042,7 @@
}
public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedString_);
+ result.repeatedString_.Add(values);
return this;
}
public Builder ClearRepeatedString() {
@@ -5070,7 +5074,7 @@
}
public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedBytes_);
+ result.repeatedBytes_.Add(values);
return this;
}
public Builder ClearRepeatedBytes() {
@@ -5114,7 +5118,7 @@
}
public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedGroup_);
+ result.repeatedGroup_.Add(values);
return this;
}
public Builder ClearRepeatedGroup() {
@@ -5158,7 +5162,7 @@
}
public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedNestedMessage() {
@@ -5202,7 +5206,7 @@
}
public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(values);
return this;
}
public Builder ClearRepeatedForeignMessage() {
@@ -5246,7 +5250,7 @@
}
public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(values);
return this;
}
public Builder ClearRepeatedImportMessage() {
@@ -5276,7 +5280,7 @@
}
public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(values);
return this;
}
public Builder ClearRepeatedNestedEnum() {
@@ -5306,7 +5310,7 @@
}
public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(values);
return this;
}
public Builder ClearRepeatedForeignEnum() {
@@ -5336,7 +5340,7 @@
}
public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(values);
return this;
}
public Builder ClearRepeatedImportEnum() {
@@ -5368,7 +5372,7 @@
}
public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(values);
return this;
}
public Builder ClearRepeatedStringPiece() {
@@ -5400,7 +5404,7 @@
}
public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedCord_);
+ result.repeatedCord_.Add(values);
return this;
}
public Builder ClearRepeatedCord() {
@@ -5830,6 +5834,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDeprecatedFields : pb::GeneratedMessage<TestDeprecatedFields, TestDeprecatedFields.Builder> {
+ private TestDeprecatedFields() { }
private static readonly TestDeprecatedFields defaultInstance = new TestDeprecatedFields().MakeReadOnly();
private static readonly string[] _testDeprecatedFieldsFieldNames = new string[] { "deprecated_int32" };
private static readonly uint[] _testDeprecatedFieldsFieldTags = new uint[] { 8 };
@@ -5856,9 +5861,11 @@
public const int DeprecatedInt32FieldNumber = 1;
private bool hasDeprecatedInt32;
private int deprecatedInt32_;
+ [global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return hasDeprecatedInt32; }
}
+ [global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return deprecatedInt32_; }
}
@@ -6074,19 +6081,23 @@
}
+ [global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return result.hasDeprecatedInt32; }
}
+ [global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return result.DeprecatedInt32; }
set { SetDeprecatedInt32(value); }
}
+ [global::System.ObsoleteAttribute()]
public Builder SetDeprecatedInt32(int value) {
PrepareBuilder();
result.hasDeprecatedInt32 = true;
result.deprecatedInt32_ = value;
return this;
}
+ [global::System.ObsoleteAttribute()]
public Builder ClearDeprecatedInt32() {
PrepareBuilder();
result.hasDeprecatedInt32 = false;
@@ -6103,6 +6114,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ForeignMessage : pb::GeneratedMessage<ForeignMessage, ForeignMessage.Builder> {
+ private ForeignMessage() { }
private static readonly ForeignMessage defaultInstance = new ForeignMessage().MakeReadOnly();
private static readonly string[] _foreignMessageFieldNames = new string[] { "c" };
private static readonly uint[] _foreignMessageFieldTags = new uint[] { 8 };
@@ -6376,6 +6388,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestAllExtensions : pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.Builder> {
+ private TestAllExtensions() { }
private static readonly TestAllExtensions defaultInstance = new TestAllExtensions().MakeReadOnly();
private static readonly string[] _testAllExtensionsFieldNames = new string[] { };
private static readonly uint[] _testAllExtensionsFieldTags = new uint[] { };
@@ -6611,6 +6624,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionalGroup_extension : pb::GeneratedMessage<OptionalGroup_extension, OptionalGroup_extension.Builder> {
+ private OptionalGroup_extension() { }
private static readonly OptionalGroup_extension defaultInstance = new OptionalGroup_extension().MakeReadOnly();
private static readonly string[] _optionalGroupExtensionFieldNames = new string[] { "a" };
private static readonly uint[] _optionalGroupExtensionFieldTags = new uint[] { 136 };
@@ -6884,6 +6898,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RepeatedGroup_extension : pb::GeneratedMessage<RepeatedGroup_extension, RepeatedGroup_extension.Builder> {
+ private RepeatedGroup_extension() { }
private static readonly RepeatedGroup_extension defaultInstance = new RepeatedGroup_extension().MakeReadOnly();
private static readonly string[] _repeatedGroupExtensionFieldNames = new string[] { "a" };
private static readonly uint[] _repeatedGroupExtensionFieldTags = new uint[] { 376 };
@@ -7157,6 +7172,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestNestedExtension : pb::GeneratedMessage<TestNestedExtension, TestNestedExtension.Builder> {
+ private TestNestedExtension() { }
private static readonly TestNestedExtension defaultInstance = new TestNestedExtension().MakeReadOnly();
private static readonly string[] _testNestedExtensionFieldNames = new string[] { };
private static readonly uint[] _testNestedExtensionFieldTags = new uint[] { };
@@ -7389,6 +7405,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRequired : pb::GeneratedMessage<TestRequired, TestRequired.Builder> {
+ private TestRequired() { }
private static readonly TestRequired defaultInstance = new TestRequired().MakeReadOnly();
private static readonly string[] _testRequiredFieldNames = new string[] { "a", "b", "c", "dummy10", "dummy11", "dummy12", "dummy13", "dummy14", "dummy15", "dummy16", "dummy17", "dummy18", "dummy19", "dummy2", "dummy20", "dummy21", "dummy22", "dummy23", "dummy24", "dummy25", "dummy26", "dummy27", "dummy28", "dummy29", "dummy30", "dummy31", "dummy32", "dummy4", "dummy5", "dummy6", "dummy7", "dummy8", "dummy9" };
private static readonly uint[] _testRequiredFieldTags = new uint[] { 8, 24, 264, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 16, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 32, 40, 48, 56, 64, 72 };
@@ -9045,6 +9062,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRequiredForeign : pb::GeneratedMessage<TestRequiredForeign, TestRequiredForeign.Builder> {
+ private TestRequiredForeign() { }
private static readonly TestRequiredForeign defaultInstance = new TestRequiredForeign().MakeReadOnly();
private static readonly string[] _testRequiredForeignFieldNames = new string[] { "dummy", "optional_message", "repeated_message" };
private static readonly uint[] _testRequiredForeignFieldTags = new uint[] { 24, 10, 18 };
@@ -9274,7 +9292,7 @@
MergeOptionalMessage(other.OptionalMessage);
}
if (other.repeatedMessage_.Count != 0) {
- base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
+ result.repeatedMessage_.Add(other.repeatedMessage_);
}
if (other.HasDummy) {
Dummy = other.Dummy;
@@ -9424,7 +9442,7 @@
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestRequired> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedMessage_);
+ result.repeatedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedMessage() {
@@ -9462,6 +9480,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestForeignNested : pb::GeneratedMessage<TestForeignNested, TestForeignNested.Builder> {
+ private TestForeignNested() { }
private static readonly TestForeignNested defaultInstance = new TestForeignNested().MakeReadOnly();
private static readonly string[] _testForeignNestedFieldNames = new string[] { "foreign_nested" };
private static readonly uint[] _testForeignNestedFieldTags = new uint[] { 10 };
@@ -9760,6 +9779,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestEmptyMessage : pb::GeneratedMessage<TestEmptyMessage, TestEmptyMessage.Builder> {
+ private TestEmptyMessage() { }
private static readonly TestEmptyMessage defaultInstance = new TestEmptyMessage().MakeReadOnly();
private static readonly string[] _testEmptyMessageFieldNames = new string[] { };
private static readonly uint[] _testEmptyMessageFieldTags = new uint[] { };
@@ -9990,6 +10010,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestEmptyMessageWithExtensions : pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder> {
+ private TestEmptyMessageWithExtensions() { }
private static readonly TestEmptyMessageWithExtensions defaultInstance = new TestEmptyMessageWithExtensions().MakeReadOnly();
private static readonly string[] _testEmptyMessageWithExtensionsFieldNames = new string[] { };
private static readonly uint[] _testEmptyMessageWithExtensionsFieldTags = new uint[] { };
@@ -10225,6 +10246,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMultipleExtensionRanges : pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder> {
+ private TestMultipleExtensionRanges() { }
private static readonly TestMultipleExtensionRanges defaultInstance = new TestMultipleExtensionRanges().MakeReadOnly();
private static readonly string[] _testMultipleExtensionRangesFieldNames = new string[] { };
private static readonly uint[] _testMultipleExtensionRangesFieldTags = new uint[] { };
@@ -10462,6 +10484,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestReallyLargeTagNumber : pb::GeneratedMessage<TestReallyLargeTagNumber, TestReallyLargeTagNumber.Builder> {
+ private TestReallyLargeTagNumber() { }
private static readonly TestReallyLargeTagNumber defaultInstance = new TestReallyLargeTagNumber().MakeReadOnly();
private static readonly string[] _testReallyLargeTagNumberFieldNames = new string[] { "a", "bb" };
private static readonly uint[] _testReallyLargeTagNumberFieldTags = new uint[] { 8, 2147483640 };
@@ -10778,6 +10801,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRecursiveMessage : pb::GeneratedMessage<TestRecursiveMessage, TestRecursiveMessage.Builder> {
+ private TestRecursiveMessage() { }
private static readonly TestRecursiveMessage defaultInstance = new TestRecursiveMessage().MakeReadOnly();
private static readonly string[] _testRecursiveMessageFieldNames = new string[] { "a", "i" };
private static readonly uint[] _testRecursiveMessageFieldTags = new uint[] { 10, 16 };
@@ -11119,6 +11143,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMutualRecursionA : pb::GeneratedMessage<TestMutualRecursionA, TestMutualRecursionA.Builder> {
+ private TestMutualRecursionA() { }
private static readonly TestMutualRecursionA defaultInstance = new TestMutualRecursionA().MakeReadOnly();
private static readonly string[] _testMutualRecursionAFieldNames = new string[] { "bb" };
private static readonly uint[] _testMutualRecursionAFieldTags = new uint[] { 10 };
@@ -11417,6 +11442,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMutualRecursionB : pb::GeneratedMessage<TestMutualRecursionB, TestMutualRecursionB.Builder> {
+ private TestMutualRecursionB() { }
private static readonly TestMutualRecursionB defaultInstance = new TestMutualRecursionB().MakeReadOnly();
private static readonly string[] _testMutualRecursionBFieldNames = new string[] { "a", "optional_int32" };
private static readonly uint[] _testMutualRecursionBFieldTags = new uint[] { 10, 16 };
@@ -11758,6 +11784,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDupFieldNumber : pb::GeneratedMessage<TestDupFieldNumber, TestDupFieldNumber.Builder> {
+ private TestDupFieldNumber() { }
private static readonly TestDupFieldNumber defaultInstance = new TestDupFieldNumber().MakeReadOnly();
private static readonly string[] _testDupFieldNumberFieldNames = new string[] { "a", "bar", "foo" };
private static readonly uint[] _testDupFieldNumberFieldTags = new uint[] { 8, 27, 19 };
@@ -11790,6 +11817,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Foo : pb::GeneratedMessage<Foo, Foo.Builder> {
+ private Foo() { }
private static readonly Foo defaultInstance = new Foo().MakeReadOnly();
private static readonly string[] _fooFieldNames = new string[] { "a" };
private static readonly uint[] _fooFieldTags = new uint[] { 8 };
@@ -12063,6 +12091,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Bar : pb::GeneratedMessage<Bar, Bar.Builder> {
+ private Bar() { }
private static readonly Bar defaultInstance = new Bar().MakeReadOnly();
private static readonly string[] _barFieldNames = new string[] { "a" };
private static readonly uint[] _barFieldTags = new uint[] { 8 };
@@ -12721,6 +12750,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestNestedMessageHasBits : pb::GeneratedMessage<TestNestedMessageHasBits, TestNestedMessageHasBits.Builder> {
+ private TestNestedMessageHasBits() { }
private static readonly TestNestedMessageHasBits defaultInstance = new TestNestedMessageHasBits().MakeReadOnly();
private static readonly string[] _testNestedMessageHasBitsFieldNames = new string[] { "optional_nested_message" };
private static readonly uint[] _testNestedMessageHasBitsFieldTags = new uint[] { 10 };
@@ -12753,6 +12783,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
private static readonly string[] _nestedMessageFieldNames = new string[] { "nestedmessage_repeated_foreignmessage", "nestedmessage_repeated_int32" };
private static readonly uint[] _nestedMessageFieldTags = new uint[] { 18, 8 };
@@ -12965,10 +12996,10 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) return this;
PrepareBuilder();
if (other.nestedmessageRepeatedInt32_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedInt32_, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
}
if (other.nestedmessageRepeatedForeignmessage_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedForeignmessage_, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -13053,7 +13084,7 @@
}
public Builder AddRangeNestedmessageRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedInt32() {
@@ -13097,7 +13128,7 @@
}
public Builder AddRangeNestedmessageRepeatedForeignmessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedForeignmessage() {
@@ -13389,6 +13420,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestCamelCaseFieldNames : pb::GeneratedMessage<TestCamelCaseFieldNames, TestCamelCaseFieldNames.Builder> {
+ private TestCamelCaseFieldNames() { }
private static readonly TestCamelCaseFieldNames defaultInstance = new TestCamelCaseFieldNames().MakeReadOnly();
private static readonly string[] _testCamelCaseFieldNamesFieldNames = new string[] { "CordField", "EnumField", "MessageField", "PrimitiveField", "RepeatedCordField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedStringPieceField", "StringField", "StringPieceField" };
private static readonly uint[] _testCamelCaseFieldNamesFieldTags = new uint[] { 50, 24, 34, 8, 98, 72, 82, 56, 66, 90, 18, 42 };
@@ -13813,22 +13845,22 @@
CordField = other.CordField;
}
if (other.repeatedPrimitiveField_.Count != 0) {
- base.AddRange(other.repeatedPrimitiveField_, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
}
if (other.repeatedStringField_.Count != 0) {
- base.AddRange(other.repeatedStringField_, result.repeatedStringField_);
+ result.repeatedStringField_.Add(other.repeatedStringField_);
}
if (other.repeatedEnumField_.Count != 0) {
- base.AddRange(other.repeatedEnumField_, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(other.repeatedEnumField_);
}
if (other.repeatedMessageField_.Count != 0) {
- base.AddRange(other.repeatedMessageField_, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(other.repeatedMessageField_);
}
if (other.repeatedStringPieceField_.Count != 0) {
- base.AddRange(other.repeatedStringPieceField_, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
}
if (other.repeatedCordField_.Count != 0) {
- base.AddRange(other.repeatedCordField_, result.repeatedCordField_);
+ result.repeatedCordField_.Add(other.repeatedCordField_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -14119,7 +14151,7 @@
}
public Builder AddRangeRepeatedPrimitiveField(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(values);
return this;
}
public Builder ClearRepeatedPrimitiveField() {
@@ -14151,7 +14183,7 @@
}
public Builder AddRangeRepeatedStringField(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringField_);
+ result.repeatedStringField_.Add(values);
return this;
}
public Builder ClearRepeatedStringField() {
@@ -14181,7 +14213,7 @@
}
public Builder AddRangeRepeatedEnumField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(values);
return this;
}
public Builder ClearRepeatedEnumField() {
@@ -14225,7 +14257,7 @@
}
public Builder AddRangeRepeatedMessageField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(values);
return this;
}
public Builder ClearRepeatedMessageField() {
@@ -14257,7 +14289,7 @@
}
public Builder AddRangeRepeatedStringPieceField(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(values);
return this;
}
public Builder ClearRepeatedStringPieceField() {
@@ -14289,7 +14321,7 @@
}
public Builder AddRangeRepeatedCordField(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedCordField_);
+ result.repeatedCordField_.Add(values);
return this;
}
public Builder ClearRepeatedCordField() {
@@ -14307,6 +14339,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestFieldOrderings : pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder> {
+ private TestFieldOrderings() { }
private static readonly TestFieldOrderings defaultInstance = new TestFieldOrderings().MakeReadOnly();
private static readonly string[] _testFieldOrderingsFieldNames = new string[] { "my_float", "my_int", "my_string" };
private static readonly uint[] _testFieldOrderingsFieldTags = new uint[] { 813, 8, 90 };
@@ -14673,6 +14706,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestExtremeDefaultValues : pb::GeneratedMessage<TestExtremeDefaultValues, TestExtremeDefaultValues.Builder> {
+ private TestExtremeDefaultValues() { }
private static readonly TestExtremeDefaultValues defaultInstance = new TestExtremeDefaultValues().MakeReadOnly();
private static readonly string[] _testExtremeDefaultValuesFieldNames = new string[] { "escaped_bytes", "inf_double", "inf_float", "large_float", "large_uint32", "large_uint64", "nan_double", "nan_float", "neg_inf_double", "neg_inf_float", "negative_float", "negative_one_float", "one_float", "small_float", "small_int32", "small_int64", "small_negative_float", "utf8_string", "zero_float" };
private static readonly uint[] _testExtremeDefaultValuesFieldTags = new uint[] { 10, 113, 141, 101, 16, 24, 129, 157, 121, 149, 93, 85, 69, 77, 32, 40, 109, 50, 61 };
@@ -15728,6 +15762,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OneString : pb::GeneratedMessage<OneString, OneString.Builder> {
+ private OneString() { }
private static readonly OneString defaultInstance = new OneString().MakeReadOnly();
private static readonly string[] _oneStringFieldNames = new string[] { "data" };
private static readonly uint[] _oneStringFieldTags = new uint[] { 10 };
@@ -16002,6 +16037,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OneBytes : pb::GeneratedMessage<OneBytes, OneBytes.Builder> {
+ private OneBytes() { }
private static readonly OneBytes defaultInstance = new OneBytes().MakeReadOnly();
private static readonly string[] _oneBytesFieldNames = new string[] { "data" };
private static readonly uint[] _oneBytesFieldTags = new uint[] { 10 };
@@ -16276,6 +16312,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestPackedTypes : pb::GeneratedMessage<TestPackedTypes, TestPackedTypes.Builder> {
+ private TestPackedTypes() { }
private static readonly TestPackedTypes defaultInstance = new TestPackedTypes().MakeReadOnly();
private static readonly string[] _testPackedTypesFieldNames = new string[] { "packed_bool", "packed_double", "packed_enum", "packed_fixed32", "packed_fixed64", "packed_float", "packed_int32", "packed_int64", "packed_sfixed32", "packed_sfixed64", "packed_sint32", "packed_sint64", "packed_uint32", "packed_uint64" };
private static readonly uint[] _testPackedTypesFieldTags = new uint[] { 818, 810, 826, 770, 778, 802, 722, 730, 786, 794, 754, 762, 738, 746 };
@@ -16832,46 +16869,46 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance) return this;
PrepareBuilder();
if (other.packedInt32_.Count != 0) {
- base.AddRange(other.packedInt32_, result.packedInt32_);
+ result.packedInt32_.Add(other.packedInt32_);
}
if (other.packedInt64_.Count != 0) {
- base.AddRange(other.packedInt64_, result.packedInt64_);
+ result.packedInt64_.Add(other.packedInt64_);
}
if (other.packedUint32_.Count != 0) {
- base.AddRange(other.packedUint32_, result.packedUint32_);
+ result.packedUint32_.Add(other.packedUint32_);
}
if (other.packedUint64_.Count != 0) {
- base.AddRange(other.packedUint64_, result.packedUint64_);
+ result.packedUint64_.Add(other.packedUint64_);
}
if (other.packedSint32_.Count != 0) {
- base.AddRange(other.packedSint32_, result.packedSint32_);
+ result.packedSint32_.Add(other.packedSint32_);
}
if (other.packedSint64_.Count != 0) {
- base.AddRange(other.packedSint64_, result.packedSint64_);
+ result.packedSint64_.Add(other.packedSint64_);
}
if (other.packedFixed32_.Count != 0) {
- base.AddRange(other.packedFixed32_, result.packedFixed32_);
+ result.packedFixed32_.Add(other.packedFixed32_);
}
if (other.packedFixed64_.Count != 0) {
- base.AddRange(other.packedFixed64_, result.packedFixed64_);
+ result.packedFixed64_.Add(other.packedFixed64_);
}
if (other.packedSfixed32_.Count != 0) {
- base.AddRange(other.packedSfixed32_, result.packedSfixed32_);
+ result.packedSfixed32_.Add(other.packedSfixed32_);
}
if (other.packedSfixed64_.Count != 0) {
- base.AddRange(other.packedSfixed64_, result.packedSfixed64_);
+ result.packedSfixed64_.Add(other.packedSfixed64_);
}
if (other.packedFloat_.Count != 0) {
- base.AddRange(other.packedFloat_, result.packedFloat_);
+ result.packedFloat_.Add(other.packedFloat_);
}
if (other.packedDouble_.Count != 0) {
- base.AddRange(other.packedDouble_, result.packedDouble_);
+ result.packedDouble_.Add(other.packedDouble_);
}
if (other.packedBool_.Count != 0) {
- base.AddRange(other.packedBool_, result.packedBool_);
+ result.packedBool_.Add(other.packedBool_);
}
if (other.packedEnum_.Count != 0) {
- base.AddRange(other.packedEnum_, result.packedEnum_);
+ result.packedEnum_.Add(other.packedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -17026,7 +17063,7 @@
}
public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedInt32_);
+ result.packedInt32_.Add(values);
return this;
}
public Builder ClearPackedInt32() {
@@ -17056,7 +17093,7 @@
}
public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedInt64_);
+ result.packedInt64_.Add(values);
return this;
}
public Builder ClearPackedInt64() {
@@ -17091,7 +17128,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.packedUint32_);
+ result.packedUint32_.Add(values);
return this;
}
public Builder ClearPackedUint32() {
@@ -17126,7 +17163,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.packedUint64_);
+ result.packedUint64_.Add(values);
return this;
}
public Builder ClearPackedUint64() {
@@ -17156,7 +17193,7 @@
}
public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSint32_);
+ result.packedSint32_.Add(values);
return this;
}
public Builder ClearPackedSint32() {
@@ -17186,7 +17223,7 @@
}
public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSint64_);
+ result.packedSint64_.Add(values);
return this;
}
public Builder ClearPackedSint64() {
@@ -17221,7 +17258,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFixed32_);
+ result.packedFixed32_.Add(values);
return this;
}
public Builder ClearPackedFixed32() {
@@ -17256,7 +17293,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFixed64_);
+ result.packedFixed64_.Add(values);
return this;
}
public Builder ClearPackedFixed64() {
@@ -17286,7 +17323,7 @@
}
public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSfixed32_);
+ result.packedSfixed32_.Add(values);
return this;
}
public Builder ClearPackedSfixed32() {
@@ -17316,7 +17353,7 @@
}
public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSfixed64_);
+ result.packedSfixed64_.Add(values);
return this;
}
public Builder ClearPackedSfixed64() {
@@ -17346,7 +17383,7 @@
}
public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFloat_);
+ result.packedFloat_.Add(values);
return this;
}
public Builder ClearPackedFloat() {
@@ -17376,7 +17413,7 @@
}
public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.packedDouble_);
+ result.packedDouble_.Add(values);
return this;
}
public Builder ClearPackedDouble() {
@@ -17406,7 +17443,7 @@
}
public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.packedBool_);
+ result.packedBool_.Add(values);
return this;
}
public Builder ClearPackedBool() {
@@ -17436,7 +17473,7 @@
}
public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.packedEnum_);
+ result.packedEnum_.Add(values);
return this;
}
public Builder ClearPackedEnum() {
@@ -17454,6 +17491,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestUnpackedTypes : pb::GeneratedMessage<TestUnpackedTypes, TestUnpackedTypes.Builder> {
+ private TestUnpackedTypes() { }
private static readonly TestUnpackedTypes defaultInstance = new TestUnpackedTypes().MakeReadOnly();
private static readonly string[] _testUnpackedTypesFieldNames = new string[] { "unpacked_bool", "unpacked_double", "unpacked_enum", "unpacked_fixed32", "unpacked_fixed64", "unpacked_float", "unpacked_int32", "unpacked_int64", "unpacked_sfixed32", "unpacked_sfixed64", "unpacked_sint32", "unpacked_sint64", "unpacked_uint32", "unpacked_uint64" };
private static readonly uint[] _testUnpackedTypesFieldTags = new uint[] { 816, 809, 824, 773, 777, 805, 720, 728, 789, 793, 752, 760, 736, 744 };
@@ -17955,46 +17993,46 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.DefaultInstance) return this;
PrepareBuilder();
if (other.unpackedInt32_.Count != 0) {
- base.AddRange(other.unpackedInt32_, result.unpackedInt32_);
+ result.unpackedInt32_.Add(other.unpackedInt32_);
}
if (other.unpackedInt64_.Count != 0) {
- base.AddRange(other.unpackedInt64_, result.unpackedInt64_);
+ result.unpackedInt64_.Add(other.unpackedInt64_);
}
if (other.unpackedUint32_.Count != 0) {
- base.AddRange(other.unpackedUint32_, result.unpackedUint32_);
+ result.unpackedUint32_.Add(other.unpackedUint32_);
}
if (other.unpackedUint64_.Count != 0) {
- base.AddRange(other.unpackedUint64_, result.unpackedUint64_);
+ result.unpackedUint64_.Add(other.unpackedUint64_);
}
if (other.unpackedSint32_.Count != 0) {
- base.AddRange(other.unpackedSint32_, result.unpackedSint32_);
+ result.unpackedSint32_.Add(other.unpackedSint32_);
}
if (other.unpackedSint64_.Count != 0) {
- base.AddRange(other.unpackedSint64_, result.unpackedSint64_);
+ result.unpackedSint64_.Add(other.unpackedSint64_);
}
if (other.unpackedFixed32_.Count != 0) {
- base.AddRange(other.unpackedFixed32_, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(other.unpackedFixed32_);
}
if (other.unpackedFixed64_.Count != 0) {
- base.AddRange(other.unpackedFixed64_, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(other.unpackedFixed64_);
}
if (other.unpackedSfixed32_.Count != 0) {
- base.AddRange(other.unpackedSfixed32_, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
}
if (other.unpackedSfixed64_.Count != 0) {
- base.AddRange(other.unpackedSfixed64_, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
}
if (other.unpackedFloat_.Count != 0) {
- base.AddRange(other.unpackedFloat_, result.unpackedFloat_);
+ result.unpackedFloat_.Add(other.unpackedFloat_);
}
if (other.unpackedDouble_.Count != 0) {
- base.AddRange(other.unpackedDouble_, result.unpackedDouble_);
+ result.unpackedDouble_.Add(other.unpackedDouble_);
}
if (other.unpackedBool_.Count != 0) {
- base.AddRange(other.unpackedBool_, result.unpackedBool_);
+ result.unpackedBool_.Add(other.unpackedBool_);
}
if (other.unpackedEnum_.Count != 0) {
- base.AddRange(other.unpackedEnum_, result.unpackedEnum_);
+ result.unpackedEnum_.Add(other.unpackedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -18149,7 +18187,7 @@
}
public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedInt32_);
+ result.unpackedInt32_.Add(values);
return this;
}
public Builder ClearUnpackedInt32() {
@@ -18179,7 +18217,7 @@
}
public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedInt64_);
+ result.unpackedInt64_.Add(values);
return this;
}
public Builder ClearUnpackedInt64() {
@@ -18214,7 +18252,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedUint32_);
+ result.unpackedUint32_.Add(values);
return this;
}
public Builder ClearUnpackedUint32() {
@@ -18249,7 +18287,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedUint64_);
+ result.unpackedUint64_.Add(values);
return this;
}
public Builder ClearUnpackedUint64() {
@@ -18279,7 +18317,7 @@
}
public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSint32_);
+ result.unpackedSint32_.Add(values);
return this;
}
public Builder ClearUnpackedSint32() {
@@ -18309,7 +18347,7 @@
}
public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSint64_);
+ result.unpackedSint64_.Add(values);
return this;
}
public Builder ClearUnpackedSint64() {
@@ -18344,7 +18382,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(values);
return this;
}
public Builder ClearUnpackedFixed32() {
@@ -18379,7 +18417,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(values);
return this;
}
public Builder ClearUnpackedFixed64() {
@@ -18409,7 +18447,7 @@
}
public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed32() {
@@ -18439,7 +18477,7 @@
}
public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed64() {
@@ -18469,7 +18507,7 @@
}
public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFloat_);
+ result.unpackedFloat_.Add(values);
return this;
}
public Builder ClearUnpackedFloat() {
@@ -18499,7 +18537,7 @@
}
public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedDouble_);
+ result.unpackedDouble_.Add(values);
return this;
}
public Builder ClearUnpackedDouble() {
@@ -18529,7 +18567,7 @@
}
public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedBool_);
+ result.unpackedBool_.Add(values);
return this;
}
public Builder ClearUnpackedBool() {
@@ -18559,7 +18597,7 @@
}
public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedEnum_);
+ result.unpackedEnum_.Add(values);
return this;
}
public Builder ClearUnpackedEnum() {
@@ -18577,6 +18615,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestPackedExtensions : pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.Builder> {
+ private TestPackedExtensions() { }
private static readonly TestPackedExtensions defaultInstance = new TestPackedExtensions().MakeReadOnly();
private static readonly string[] _testPackedExtensionsFieldNames = new string[] { };
private static readonly uint[] _testPackedExtensionsFieldTags = new uint[] { };
@@ -18812,6 +18851,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestUnpackedExtensions : pb::ExtendableMessage<TestUnpackedExtensions, TestUnpackedExtensions.Builder> {
+ private TestUnpackedExtensions() { }
private static readonly TestUnpackedExtensions defaultInstance = new TestUnpackedExtensions().MakeReadOnly();
private static readonly string[] _testUnpackedExtensionsFieldNames = new string[] { };
private static readonly uint[] _testUnpackedExtensionsFieldTags = new uint[] { };
@@ -19047,6 +19087,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDynamicExtensions : pb::GeneratedMessage<TestDynamicExtensions, TestDynamicExtensions.Builder> {
+ private TestDynamicExtensions() { }
private static readonly TestDynamicExtensions defaultInstance = new TestDynamicExtensions().MakeReadOnly();
private static readonly string[] _testDynamicExtensionsFieldNames = new string[] { "dynamic_enum_extension", "dynamic_message_extension", "enum_extension", "message_extension", "packed_extension", "repeated_extension", "scalar_extension" };
private static readonly uint[] _testDynamicExtensionsFieldTags = new uint[] { 16016, 16034, 16008, 16026, 16050, 16042, 16005 };
@@ -19087,6 +19128,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DynamicMessageType : pb::GeneratedMessage<DynamicMessageType, DynamicMessageType.Builder> {
+ private DynamicMessageType() { }
private static readonly DynamicMessageType defaultInstance = new DynamicMessageType().MakeReadOnly();
private static readonly string[] _dynamicMessageTypeFieldNames = new string[] { "dynamic_field" };
private static readonly uint[] _dynamicMessageTypeFieldTags = new uint[] { 16800 };
@@ -19653,10 +19695,10 @@
MergeDynamicMessageExtension(other.DynamicMessageExtension);
}
if (other.repeatedExtension_.Count != 0) {
- base.AddRange(other.repeatedExtension_, result.repeatedExtension_);
+ result.repeatedExtension_.Add(other.repeatedExtension_);
}
if (other.packedExtension_.Count != 0) {
- base.AddRange(other.packedExtension_, result.packedExtension_);
+ result.packedExtension_.Add(other.packedExtension_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -19931,7 +19973,7 @@
}
public Builder AddRangeRepeatedExtension(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedExtension_);
+ result.repeatedExtension_.Add(values);
return this;
}
public Builder ClearRepeatedExtension() {
@@ -19961,7 +20003,7 @@
}
public Builder AddRangePackedExtension(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedExtension_);
+ result.packedExtension_.Add(values);
return this;
}
public Builder ClearPackedExtension() {
@@ -19979,6 +20021,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::GeneratedMessage<TestRepeatedScalarDifferentTagSizes, TestRepeatedScalarDifferentTagSizes.Builder> {
+ private TestRepeatedScalarDifferentTagSizes() { }
private static readonly TestRepeatedScalarDifferentTagSizes defaultInstance = new TestRepeatedScalarDifferentTagSizes().MakeReadOnly();
private static readonly string[] _testRepeatedScalarDifferentTagSizesFieldNames = new string[] { "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_int32", "repeated_int64", "repeated_uint64" };
private static readonly uint[] _testRepeatedScalarDifferentTagSizesFieldTags = new uint[] { 101, 16369, 2097141, 104, 16376, 2097144 };
@@ -20292,22 +20335,22 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance) return this;
PrepareBuilder();
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -20418,7 +20461,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -20448,7 +20491,7 @@
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -20483,7 +20526,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -20513,7 +20556,7 @@
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -20543,7 +20586,7 @@
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -20578,7 +20621,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -20596,6 +20639,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FooRequest : pb::GeneratedMessage<FooRequest, FooRequest.Builder> {
+ private FooRequest() { }
private static readonly FooRequest defaultInstance = new FooRequest().MakeReadOnly();
private static readonly string[] _fooRequestFieldNames = new string[] { };
private static readonly uint[] _fooRequestFieldTags = new uint[] { };
@@ -20826,6 +20870,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FooResponse : pb::GeneratedMessage<FooResponse, FooResponse.Builder> {
+ private FooResponse() { }
private static readonly FooResponse defaultInstance = new FooResponse().MakeReadOnly();
private static readonly string[] _fooResponseFieldNames = new string[] { };
private static readonly uint[] _fooResponseFieldTags = new uint[] { };
@@ -21056,6 +21101,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class BarRequest : pb::GeneratedMessage<BarRequest, BarRequest.Builder> {
+ private BarRequest() { }
private static readonly BarRequest defaultInstance = new BarRequest().MakeReadOnly();
private static readonly string[] _barRequestFieldNames = new string[] { };
private static readonly uint[] _barRequestFieldTags = new uint[] { };
@@ -21286,6 +21332,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class BarResponse : pb::GeneratedMessage<BarResponse, BarResponse.Builder> {
+ private BarResponse() { }
private static readonly BarResponse defaultInstance = new BarResponse().MakeReadOnly();
private static readonly string[] _barResponseFieldNames = new string[] { };
private static readonly uint[] _barResponseFieldTags = new uint[] { };
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs
index c85403f..ce8f66d 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -83,6 +83,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SearchRequest : pb::GeneratedMessage<SearchRequest, SearchRequest.Builder> {
+ private SearchRequest() { }
private static readonly SearchRequest defaultInstance = new SearchRequest().MakeReadOnly();
private static readonly string[] _searchRequestFieldNames = new string[] { "Criteria" };
private static readonly uint[] _searchRequestFieldTags = new uint[] { 10 };
@@ -276,7 +277,7 @@
if (other == global::Google.ProtocolBuffers.TestProtos.SearchRequest.DefaultInstance) return this;
PrepareBuilder();
if (other.criteria_.Count != 0) {
- base.AddRange(other.criteria_, result.criteria_);
+ result.criteria_.Add(other.criteria_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -358,7 +359,7 @@
}
public Builder AddRangeCriteria(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.criteria_);
+ result.criteria_.Add(values);
return this;
}
public Builder ClearCriteria() {
@@ -376,6 +377,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SearchResponse : pb::GeneratedMessage<SearchResponse, SearchResponse.Builder> {
+ private SearchResponse() { }
private static readonly SearchResponse defaultInstance = new SearchResponse().MakeReadOnly();
private static readonly string[] _searchResponseFieldNames = new string[] { "results" };
private static readonly uint[] _searchResponseFieldTags = new uint[] { 10 };
@@ -408,6 +410,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ResultItem : pb::GeneratedMessage<ResultItem, ResultItem.Builder> {
+ private ResultItem() { }
private static readonly ResultItem defaultInstance = new ResultItem().MakeReadOnly();
private static readonly string[] _resultItemFieldNames = new string[] { "name", "url" };
private static readonly uint[] _resultItemFieldTags = new uint[] { 18, 10 };
@@ -894,7 +897,7 @@
if (other == global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance) return this;
PrepareBuilder();
if (other.results_.Count != 0) {
- base.AddRange(other.results_, result.results_);
+ result.results_.Add(other.results_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -988,7 +991,7 @@
}
public Builder AddRangeResults(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem> values) {
PrepareBuilder();
- base.AddRange(values, result.results_);
+ result.results_.Add(values);
return this;
}
public Builder ClearResults() {
@@ -1006,6 +1009,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RefineSearchRequest : pb::GeneratedMessage<RefineSearchRequest, RefineSearchRequest.Builder> {
+ private RefineSearchRequest() { }
private static readonly RefineSearchRequest defaultInstance = new RefineSearchRequest().MakeReadOnly();
private static readonly string[] _refineSearchRequestFieldNames = new string[] { "Criteria", "previous_results" };
private static readonly uint[] _refineSearchRequestFieldTags = new uint[] { 10, 18 };
@@ -1217,7 +1221,7 @@
if (other == global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.DefaultInstance) return this;
PrepareBuilder();
if (other.criteria_.Count != 0) {
- base.AddRange(other.criteria_, result.criteria_);
+ result.criteria_.Add(other.criteria_);
}
if (other.HasPreviousResults) {
MergePreviousResults(other.PreviousResults);
@@ -1311,7 +1315,7 @@
}
public Builder AddRangeCriteria(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.criteria_);
+ result.criteria_.Add(values);
return this;
}
public Builder ClearCriteria() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
index e87fb1c..e63d8c3 100644
--- a/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
+++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -76,9 +76,9 @@
"dGVuc2lvbl9udW1iZXISJy5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0" +
"WG1sTWVzc2FnZRhnIAMoBUICEAE6bgoRZXh0ZW5zaW9uX21lc3NhZ2USJy5w" +
"cm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sTWVzc2FnZRjHASABKAsy" +
- "KS5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sRXh0ZW5zaW9uQkxI" +
- "AcI+RwohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEiJVbml0" +
- "VGVzdFhtbFNlcmlhbGl6ZXJUZXN0UHJvdG9GaWxl");
+ "KS5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sRXh0ZW5zaW9uQk5I" +
+ "AcI+SQohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEiJVbml0" +
+ "VGVzdFhtbFNlcmlhbGl6ZXJUZXN0UHJvdG9GaWxlSAE=");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor = Descriptor.MessageTypes[0];
@@ -134,10 +134,12 @@
#endregion
#region Messages
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestXmlChild : pb::GeneratedMessage<TestXmlChild, TestXmlChild.Builder> {
+ private TestXmlChild() { }
private static readonly TestXmlChild defaultInstance = new TestXmlChild().MakeReadOnly();
private static readonly string[] _testXmlChildFieldNames = new string[] { "binary", "options" };
private static readonly uint[] _testXmlChildFieldTags = new uint[] { 34, 24 };
@@ -269,6 +271,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -349,7 +352,7 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance) return this;
PrepareBuilder();
if (other.options_.Count != 0) {
- base.AddRange(other.options_, result.options_);
+ result.options_.Add(other.options_);
}
if (other.HasBinary) {
Binary = other.Binary;
@@ -446,7 +449,7 @@
}
public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) {
PrepareBuilder();
- base.AddRange(values, result.options_);
+ result.options_.Add(values);
return this;
}
public Builder ClearOptions() {
@@ -481,10 +484,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestXmlNoFields : pb::GeneratedMessage<TestXmlNoFields, TestXmlNoFields.Builder> {
+ private TestXmlNoFields() { }
private static readonly TestXmlNoFields defaultInstance = new TestXmlNoFields().MakeReadOnly();
private static readonly string[] _testXmlNoFieldsFieldNames = new string[] { };
private static readonly uint[] _testXmlNoFieldsFieldTags = new uint[] { };
@@ -574,6 +579,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -711,10 +717,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestXmlRescursive : pb::GeneratedMessage<TestXmlRescursive, TestXmlRescursive.Builder> {
+ private TestXmlRescursive() { }
private static readonly TestXmlRescursive defaultInstance = new TestXmlRescursive().MakeReadOnly();
private static readonly string[] _testXmlRescursiveFieldNames = new string[] { "child" };
private static readonly uint[] _testXmlRescursiveFieldTags = new uint[] { 10 };
@@ -820,6 +828,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -1009,10 +1018,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestXmlMessage : pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder> {
+ private TestXmlMessage() { }
private static readonly TestXmlMessage defaultInstance = new TestXmlMessage().MakeReadOnly();
private static readonly string[] _testXmlMessageFieldNames = new string[] { "child", "children", "number", "numbers", "text", "textlines", "valid" };
private static readonly uint[] _testXmlMessageFieldTags = new uint[] { 10, 3211, 48, 16, 26, 5602, 40 };
@@ -1041,10 +1052,12 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public static class Types {
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Children : pb::GeneratedMessage<Children, Children.Builder> {
+ private Children() { }
private static readonly Children defaultInstance = new Children().MakeReadOnly();
private static readonly string[] _childrenFieldNames = new string[] { "binary", "options" };
private static readonly uint[] _childrenFieldTags = new uint[] { 34, 24 };
@@ -1176,6 +1189,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -1256,7 +1270,7 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance) return this;
PrepareBuilder();
if (other.options_.Count != 0) {
- base.AddRange(other.options_, result.options_);
+ result.options_.Add(other.options_);
}
if (other.HasBinary) {
Binary = other.Binary;
@@ -1353,7 +1367,7 @@
}
public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) {
PrepareBuilder();
- base.AddRange(values, result.options_);
+ result.options_.Add(values);
return this;
}
public Builder ClearOptions() {
@@ -1592,6 +1606,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -1675,13 +1690,13 @@
Number = other.Number;
}
if (other.numbers_.Count != 0) {
- base.AddRange(other.numbers_, result.numbers_);
+ result.numbers_.Add(other.numbers_);
}
if (other.HasText) {
Text = other.Text;
}
if (other.textlines_.Count != 0) {
- base.AddRange(other.textlines_, result.textlines_);
+ result.textlines_.Add(other.textlines_);
}
if (other.HasValid) {
Valid = other.Valid;
@@ -1690,7 +1705,7 @@
MergeChild(other.Child);
}
if (other.children_.Count != 0) {
- base.AddRange(other.children_, result.children_);
+ result.children_.Add(other.children_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -1821,7 +1836,7 @@
}
public Builder AddRangeNumbers(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.numbers_);
+ result.numbers_.Add(values);
return this;
}
public Builder ClearNumbers() {
@@ -1874,7 +1889,7 @@
}
public Builder AddRangeTextlines(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.textlines_);
+ result.textlines_.Add(values);
return this;
}
public Builder ClearTextlines() {
@@ -1978,7 +1993,7 @@
}
public Builder AddRangeChildren(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> values) {
PrepareBuilder();
- base.AddRange(values, result.children_);
+ result.children_.Add(values);
return this;
}
public Builder ClearChildren() {
@@ -1992,10 +2007,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestXmlExtension : pb::GeneratedMessage<TestXmlExtension, TestXmlExtension.Builder> {
+ private TestXmlExtension() { }
private static readonly TestXmlExtension defaultInstance = new TestXmlExtension().MakeReadOnly();
private static readonly string[] _testXmlExtensionFieldNames = new string[] { "number" };
private static readonly uint[] _testXmlExtensionFieldTags = new uint[] { 8 };
@@ -2102,6 +2119,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
diff --git a/src/ProtocolBuffers/AbstractBuilder.cs b/src/ProtocolBuffers/AbstractBuilder.cs
index e477194..47d84a3 100644
--- a/src/ProtocolBuffers/AbstractBuilder.cs
+++ b/src/ProtocolBuffers/AbstractBuilder.cs
@@ -44,7 +44,7 @@
/// <summary>
/// Implementation of the non-generic IMessage interface as far as possible.
/// </summary>
- public abstract class AbstractBuilder<TMessage, TBuilder> : AbstractBuilderLite<TMessage, TBuilder>,
+ public abstract partial class AbstractBuilder<TMessage, TBuilder> : AbstractBuilderLite<TMessage, TBuilder>,
IBuilder<TMessage, TBuilder>
where TMessage : AbstractMessage<TMessage, TBuilder>
where TBuilder : AbstractBuilder<TMessage, TBuilder>
diff --git a/src/ProtocolBuffers/AbstractBuilderLite.cs b/src/ProtocolBuffers/AbstractBuilderLite.cs
index 8899d9b..a7fedea 100644
--- a/src/ProtocolBuffers/AbstractBuilderLite.cs
+++ b/src/ProtocolBuffers/AbstractBuilderLite.cs
@@ -42,7 +42,7 @@
/// <summary>
/// Implementation of the non-generic IMessage interface as far as possible.
/// </summary>
- public abstract class AbstractBuilderLite<TMessage, TBuilder> : IBuilderLite<TMessage, TBuilder>
+ public abstract partial class AbstractBuilderLite<TMessage, TBuilder> : IBuilderLite<TMessage, TBuilder>
where TMessage : AbstractMessageLite<TMessage, TBuilder>
where TBuilder : AbstractBuilderLite<TMessage, TBuilder>
{
diff --git a/src/ProtocolBuffers/AbstractMessage.cs b/src/ProtocolBuffers/AbstractMessage.cs
index 13443b1..16c8c78 100644
--- a/src/ProtocolBuffers/AbstractMessage.cs
+++ b/src/ProtocolBuffers/AbstractMessage.cs
@@ -46,7 +46,7 @@
/// <summary>
/// Implementation of the non-generic IMessage interface as far as possible.
/// </summary>
- public abstract class AbstractMessage<TMessage, TBuilder> : AbstractMessageLite<TMessage, TBuilder>,
+ public abstract partial class AbstractMessage<TMessage, TBuilder> : AbstractMessageLite<TMessage, TBuilder>,
IMessage<TMessage, TBuilder>
where TMessage : AbstractMessage<TMessage, TBuilder>
where TBuilder : AbstractBuilder<TMessage, TBuilder>
diff --git a/src/ProtocolBuffers/AbstractMessageLite.cs b/src/ProtocolBuffers/AbstractMessageLite.cs
index 021cb0e..1cdead2 100644
--- a/src/ProtocolBuffers/AbstractMessageLite.cs
+++ b/src/ProtocolBuffers/AbstractMessageLite.cs
@@ -41,7 +41,7 @@
/// <summary>
/// Implementation of the non-generic IMessage interface as far as possible.
/// </summary>
- public abstract class AbstractMessageLite<TMessage, TBuilder> : IMessageLite<TMessage, TBuilder>
+ public abstract partial class AbstractMessageLite<TMessage, TBuilder> : IMessageLite<TMessage, TBuilder>
where TMessage : AbstractMessageLite<TMessage, TBuilder>
where TBuilder : AbstractBuilderLite<TMessage, TBuilder>
{
diff --git a/src/ProtocolBuffers/CodedOutputStream.ComputeSize.cs b/src/ProtocolBuffers/CodedOutputStream.ComputeSize.cs
index 50bf28d..2da0080 100644
--- a/src/ProtocolBuffers/CodedOutputStream.ComputeSize.cs
+++ b/src/ProtocolBuffers/CodedOutputStream.ComputeSize.cs
@@ -202,7 +202,7 @@
/// </summary>
public static int ComputeEnumSize(int fieldNumber, int value)
{
- return ComputeTagSize(fieldNumber) + ComputeRawVarint32Size((uint) value);
+ return ComputeTagSize(fieldNumber) + ComputeEnumSizeNoTag(value);
}
/// <summary>
@@ -391,7 +391,7 @@
/// </summary>
public static int ComputeEnumSizeNoTag(int value)
{
- return ComputeRawVarint32Size((uint) value);
+ return ComputeInt32SizeNoTag(value);
}
/// <summary>
diff --git a/src/ProtocolBuffers/CodedOutputStream.cs b/src/ProtocolBuffers/CodedOutputStream.cs
index c14f5e0..09099ee 100644
--- a/src/ProtocolBuffers/CodedOutputStream.cs
+++ b/src/ProtocolBuffers/CodedOutputStream.cs
@@ -373,7 +373,7 @@
public void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue)
{
WriteTag(fieldNumber, WireFormat.WireType.Varint);
- WriteRawVarint32((uint) value);
+ WriteInt32NoTag(value);
}
public void WriteSFixed32(int fieldNumber, string fieldName, int value)
@@ -648,7 +648,7 @@
public void WriteEnumNoTag(int value)
{
- WriteRawVarint32((uint) value);
+ WriteInt32NoTag(value);
}
public void WriteSFixed32NoTag(int value)
diff --git a/src/ProtocolBuffers/Collections/PopsicleList.cs b/src/ProtocolBuffers/Collections/PopsicleList.cs
index dc5c583..3de97f8 100644
--- a/src/ProtocolBuffers/Collections/PopsicleList.cs
+++ b/src/ProtocolBuffers/Collections/PopsicleList.cs
@@ -42,6 +42,7 @@
/// </summary>
public sealed class PopsicleList<T> : IPopsicleList<T>, ICastArray
{
+ private static readonly bool CheckForNull = default(T) == null;
private static readonly T[] EmptySet = new T[0];
private List<T> items;
@@ -65,6 +66,10 @@
public void Insert(int index, T item)
{
ValidateModification();
+ if (CheckForNull)
+ {
+ ThrowHelper.ThrowIfNull(item);
+ }
items.Insert(index, item);
}
@@ -87,6 +92,10 @@
set
{
ValidateModification();
+ if (CheckForNull)
+ {
+ ThrowHelper.ThrowIfNull(value);
+ }
items[index] = value;
}
}
@@ -94,6 +103,10 @@
public void Add(T item)
{
ValidateModification();
+ if (CheckForNull)
+ {
+ ThrowHelper.ThrowIfNull(item);
+ }
items.Add(item);
}
@@ -145,15 +158,30 @@
public void Add(IEnumerable<T> collection)
{
- if (readOnly)
+ ValidateModification();
+ ThrowHelper.ThrowIfNull(collection);
+
+ if (!CheckForNull || collection is PopsicleList<T>)
{
- throw new NotSupportedException("List is read-only");
+ items.AddRange(collection);
}
- if (items == null)
+ else
{
- items = new List<T>();
+ // Assumption, it's ok to enumerate collections more than once.
+ if (collection is ICollection<T>)
+ {
+ ThrowHelper.ThrowIfAnyNull(collection);
+ items.AddRange(collection);
+ }
+ else
+ {
+ foreach (T item in collection)
+ {
+ ThrowHelper.ThrowIfNull(item);
+ items.Add(item);
+ }
+ }
}
- items.AddRange(collection);
}
private void ValidateModification()
diff --git a/src/ProtocolBuffers/CustomSerialization.cs b/src/ProtocolBuffers/CustomSerialization.cs
new file mode 100644
index 0000000..5af673a
--- /dev/null
+++ b/src/ProtocolBuffers/CustomSerialization.cs
@@ -0,0 +1,188 @@
+#region Copyright notice and license
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// http://github.com/jskeet/dotnet-protobufs/
+// Original C++/Java/Python code:
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#endregion
+
+using System;
+using System.Runtime.Serialization;
+
+/*
+ * This entire source file is not supported on the Silverlight platform
+ */
+#if !SILVERLIGHT2
+namespace Google.ProtocolBuffers
+{
+ /*
+ * Specialized handing of *all* message types. Messages are serialized into a byte[] and stored
+ * into the SerializationInfo, and are then reconstituted by an IObjectReference class after
+ * deserialization. IDeserializationCallback is supported on both the Builder and Message.
+ */
+ [Serializable]
+ partial class AbstractMessageLite<TMessage, TBuilder> : ISerializable
+ {
+ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.SetType(typeof(SerializationSurrogate));
+ info.AddValue("message", ToByteArray());
+ info.AddValue("initialized", IsInitialized);
+ }
+
+ [Serializable]
+ private sealed class SerializationSurrogate : IObjectReference, ISerializable
+ {
+ static readonly TBuilder TemplateInstance = (TBuilder)Activator.CreateInstance(typeof(TBuilder));
+ private readonly byte[] _message;
+ private readonly bool _initialized;
+
+ private SerializationSurrogate(SerializationInfo info, StreamingContext context)
+ {
+ _message = (byte[])info.GetValue("message", typeof(byte[]));
+ _initialized = info.GetBoolean("initialized");
+ }
+
+ object IObjectReference.GetRealObject(StreamingContext context)
+ {
+ ExtensionRegistry registry = context.Context as ExtensionRegistry;
+ TBuilder builder = TemplateInstance.DefaultInstanceForType.CreateBuilderForType();
+ builder.MergeFrom(_message, registry ?? ExtensionRegistry.Empty);
+
+ IDeserializationCallback callback = builder as IDeserializationCallback;
+ if(callback != null)
+ {
+ callback.OnDeserialization(context);
+ }
+
+ TMessage message = _initialized ? builder.Build() : builder.BuildPartial();
+ callback = message as IDeserializationCallback;
+ if (callback != null)
+ {
+ callback.OnDeserialization(context);
+ }
+
+ return message;
+ }
+
+ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.AddValue("message", _message);
+ }
+ }
+ }
+
+ [Serializable]
+ partial class AbstractBuilderLite<TMessage, TBuilder> : ISerializable
+ {
+ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.SetType(typeof(SerializationSurrogate));
+ info.AddValue("message", Clone().BuildPartial().ToByteArray());
+ }
+
+ [Serializable]
+ private sealed class SerializationSurrogate : IObjectReference, ISerializable
+ {
+ static readonly TBuilder TemplateInstance = (TBuilder)Activator.CreateInstance(typeof(TBuilder));
+ private readonly byte[] _message;
+
+ private SerializationSurrogate(SerializationInfo info, StreamingContext context)
+ {
+ _message = (byte[])info.GetValue("message", typeof(byte[]));
+ }
+
+ object IObjectReference.GetRealObject(StreamingContext context)
+ {
+ ExtensionRegistry registry = context.Context as ExtensionRegistry;
+ TBuilder builder = TemplateInstance.DefaultInstanceForType.CreateBuilderForType();
+ builder.MergeFrom(_message, registry ?? ExtensionRegistry.Empty);
+
+ IDeserializationCallback callback = builder as IDeserializationCallback;
+ if(callback != null)
+ {
+ callback.OnDeserialization(context);
+ }
+
+ return builder;
+ }
+
+ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.AddValue("message", _message);
+ }
+ }
+ }
+
+ /*
+ * Spread some attribute love around, keeping this all here so we don't use conditional compliation
+ * in every one of these classes. If we introduce a new platform that also does not support this
+ * we can control it all from this source file.
+ */
+
+ [Serializable]
+ partial class GeneratedMessageLite<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class ExtendableMessageLite<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class AbstractMessage<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class GeneratedMessage<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class ExtendableMessage<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class GeneratedBuilderLite<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class ExtendableBuilderLite<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class AbstractBuilder<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class GeneratedBuilder<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class ExtendableBuilder<TMessage, TBuilder> { }
+
+ [Serializable]
+ partial class DynamicMessage
+ {
+ [Serializable]
+ partial class Builder { }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs b/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
index 375e888..4eb9c05 100644
--- a/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
+++ b/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -52,36 +52,37 @@
byte[] descriptorData = global::System.Convert.FromBase64String(
"CiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8SD2dvb2ds" +
"ZS5wcm90b2J1ZhogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3IucHJvdG8i" +
- "tgMKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" +
+ "1wMKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" +
"bWJyZWxsYV9jbGFzc25hbWUYAiABKAkSHAoOcHVibGljX2NsYXNzZXMYAyAB" +
"KAg6BHRydWUSFgoObXVsdGlwbGVfZmlsZXMYBCABKAgSFAoMbmVzdF9jbGFz" +
"c2VzGAUgASgIEhYKDmNvZGVfY29udHJhY3RzGAYgASgIEiQKHGV4cGFuZF9u" +
"YW1lc3BhY2VfZGlyZWN0b3JpZXMYByABKAgSHAoOY2xzX2NvbXBsaWFuY2UY" +
- "CCABKAg6BHRydWUSHAoOZmlsZV9leHRlbnNpb24Y3QEgASgJOgMuY3MSGwoS" +
- "dW1icmVsbGFfbmFtZXNwYWNlGN4BIAEoCRIcChBvdXRwdXRfZGlyZWN0b3J5" +
- "GN8BIAEoCToBLhImChZpZ25vcmVfZ29vZ2xlX3Byb3RvYnVmGOABIAEoCDoF" +
- "ZmFsc2USSQoWc2VydmljZV9nZW5lcmF0b3JfdHlwZRjhASABKA4yIi5nb29n" +
- "bGUucHJvdG9idWYuQ1NoYXJwU2VydmljZVR5cGU6BE5PTkUiKwoSQ1NoYXJw" +
- "RmllbGRPcHRpb25zEhUKDXByb3BlcnR5X25hbWUYASABKAkiLAoUQ1NoYXJw" +
- "U2VydmljZU9wdGlvbnMSFAoMaW50ZXJmYWNlX2lkGAEgASgJIioKE0NTaGFy" +
- "cE1ldGhvZE9wdGlvbnMSEwoLZGlzcGF0Y2hfaWQYASABKAUqSwoRQ1NoYXJw" +
- "U2VydmljZVR5cGUSCAoETk9ORRAAEgsKB0dFTkVSSUMQARINCglJTlRFUkZB" +
- "Q0UQAhIQCgxJUlBDRElTUEFUQ0gQAzpeChNjc2hhcnBfZmlsZV9vcHRpb25z" +
- "EhwuZ29vZ2xlLnByb3RvYnVmLkZpbGVPcHRpb25zGOgHIAEoCzIiLmdvb2ds" +
- "ZS5wcm90b2J1Zi5DU2hhcnBGaWxlT3B0aW9uczphChRjc2hhcnBfZmllbGRf" +
- "b3B0aW9ucxIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMY6AcgASgL" +
- "MiMuZ29vZ2xlLnByb3RvYnVmLkNTaGFycEZpZWxkT3B0aW9uczpnChZjc2hh" +
- "cnBfc2VydmljZV9vcHRpb25zEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VP" +
- "cHRpb25zGOgHIAEoCzIlLmdvb2dsZS5wcm90b2J1Zi5DU2hhcnBTZXJ2aWNl" +
- "T3B0aW9uczpkChVjc2hhcnBfbWV0aG9kX29wdGlvbnMSHi5nb29nbGUucHJv" +
- "dG9idWYuTWV0aG9kT3B0aW9ucxjoByABKAsyJC5nb29nbGUucHJvdG9idWYu" +
- "Q1NoYXJwTWV0aG9kT3B0aW9ucw==");
+ "CCABKAg6BHRydWUSHwoQYWRkX3NlcmlhbGl6YWJsZRgJIAEoCDoFZmFsc2US" +
+ "HAoOZmlsZV9leHRlbnNpb24Y3QEgASgJOgMuY3MSGwoSdW1icmVsbGFfbmFt" +
+ "ZXNwYWNlGN4BIAEoCRIcChBvdXRwdXRfZGlyZWN0b3J5GN8BIAEoCToBLhIm" +
+ "ChZpZ25vcmVfZ29vZ2xlX3Byb3RvYnVmGOABIAEoCDoFZmFsc2USSQoWc2Vy" +
+ "dmljZV9nZW5lcmF0b3JfdHlwZRjhASABKA4yIi5nb29nbGUucHJvdG9idWYu" +
+ "Q1NoYXJwU2VydmljZVR5cGU6BE5PTkUiKwoSQ1NoYXJwRmllbGRPcHRpb25z" +
+ "EhUKDXByb3BlcnR5X25hbWUYASABKAkiLAoUQ1NoYXJwU2VydmljZU9wdGlv" +
+ "bnMSFAoMaW50ZXJmYWNlX2lkGAEgASgJIioKE0NTaGFycE1ldGhvZE9wdGlv" +
+ "bnMSEwoLZGlzcGF0Y2hfaWQYASABKAUqSwoRQ1NoYXJwU2VydmljZVR5cGUS" +
+ "CAoETk9ORRAAEgsKB0dFTkVSSUMQARINCglJTlRFUkZBQ0UQAhIQCgxJUlBD" +
+ "RElTUEFUQ0gQAzpeChNjc2hhcnBfZmlsZV9vcHRpb25zEhwuZ29vZ2xlLnBy" +
+ "b3RvYnVmLkZpbGVPcHRpb25zGOgHIAEoCzIiLmdvb2dsZS5wcm90b2J1Zi5D" +
+ "U2hhcnBGaWxlT3B0aW9uczphChRjc2hhcnBfZmllbGRfb3B0aW9ucxIdLmdv" +
+ "b2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMY6AcgASgLMiMuZ29vZ2xlLnBy" +
+ "b3RvYnVmLkNTaGFycEZpZWxkT3B0aW9uczpnChZjc2hhcnBfc2VydmljZV9v" +
+ "cHRpb25zEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zGOgHIAEo" +
+ "CzIlLmdvb2dsZS5wcm90b2J1Zi5DU2hhcnBTZXJ2aWNlT3B0aW9uczpkChVj" +
+ "c2hhcnBfbWV0aG9kX29wdGlvbnMSHi5nb29nbGUucHJvdG9idWYuTWV0aG9k" +
+ "T3B0aW9ucxjoByABKAsyJC5nb29nbGUucHJvdG9idWYuQ1NoYXJwTWV0aG9k" +
+ "T3B0aW9ucw==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_google_protobuf_CSharpFileOptions__Descriptor = Descriptor.MessageTypes[0];
internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions, global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.Builder>(internal__static_google_protobuf_CSharpFileOptions__Descriptor,
- new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", "ClsCompliance", "FileExtension", "UmbrellaNamespace", "OutputDirectory", "IgnoreGoogleProtobuf", "ServiceGeneratorType", });
+ new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", "ClsCompliance", "AddSerializable", "FileExtension", "UmbrellaNamespace", "OutputDirectory", "IgnoreGoogleProtobuf", "ServiceGeneratorType", });
internal__static_google_protobuf_CSharpFieldOptions__Descriptor = Descriptor.MessageTypes[1];
internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions, global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.Builder>(internal__static_google_protobuf_CSharpFieldOptions__Descriptor,
@@ -125,9 +126,10 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpFileOptions : pb::GeneratedMessage<CSharpFileOptions, CSharpFileOptions.Builder> {
+ private CSharpFileOptions() { }
private static readonly CSharpFileOptions defaultInstance = new CSharpFileOptions().MakeReadOnly();
- private static readonly string[] _cSharpFileOptionsFieldNames = new string[] { "cls_compliance", "code_contracts", "expand_namespace_directories", "file_extension", "ignore_google_protobuf", "multiple_files", "namespace", "nest_classes", "output_directory", "public_classes", "service_generator_type", "umbrella_classname", "umbrella_namespace" };
- private static readonly uint[] _cSharpFileOptionsFieldTags = new uint[] { 64, 48, 56, 1770, 1792, 32, 10, 40, 1786, 24, 1800, 18, 1778 };
+ private static readonly string[] _cSharpFileOptionsFieldNames = new string[] { "add_serializable", "cls_compliance", "code_contracts", "expand_namespace_directories", "file_extension", "ignore_google_protobuf", "multiple_files", "namespace", "nest_classes", "output_directory", "public_classes", "service_generator_type", "umbrella_classname", "umbrella_namespace" };
+ private static readonly uint[] _cSharpFileOptionsFieldTags = new uint[] { 72, 64, 48, 56, 1770, 1792, 32, 10, 40, 1786, 24, 1800, 18, 1778 };
public static CSharpFileOptions DefaultInstance {
get { return defaultInstance; }
}
@@ -228,6 +230,16 @@
get { return clsCompliance_; }
}
+ public const int AddSerializableFieldNumber = 9;
+ private bool hasAddSerializable;
+ private bool addSerializable_;
+ public bool HasAddSerializable {
+ get { return hasAddSerializable; }
+ }
+ public bool AddSerializable {
+ get { return addSerializable_; }
+ }
+
public const int FileExtensionFieldNumber = 221;
private bool hasFileExtension;
private string fileExtension_ = ".cs";
@@ -288,43 +300,46 @@
int size = SerializedSize;
string[] field_names = _cSharpFileOptionsFieldNames;
if (hasNamespace) {
- output.WriteString(1, field_names[6], Namespace);
+ output.WriteString(1, field_names[7], Namespace);
}
if (hasUmbrellaClassname) {
- output.WriteString(2, field_names[11], UmbrellaClassname);
+ output.WriteString(2, field_names[12], UmbrellaClassname);
}
if (hasPublicClasses) {
- output.WriteBool(3, field_names[9], PublicClasses);
+ output.WriteBool(3, field_names[10], PublicClasses);
}
if (hasMultipleFiles) {
- output.WriteBool(4, field_names[5], MultipleFiles);
+ output.WriteBool(4, field_names[6], MultipleFiles);
}
if (hasNestClasses) {
- output.WriteBool(5, field_names[7], NestClasses);
+ output.WriteBool(5, field_names[8], NestClasses);
}
if (hasCodeContracts) {
- output.WriteBool(6, field_names[1], CodeContracts);
+ output.WriteBool(6, field_names[2], CodeContracts);
}
if (hasExpandNamespaceDirectories) {
- output.WriteBool(7, field_names[2], ExpandNamespaceDirectories);
+ output.WriteBool(7, field_names[3], ExpandNamespaceDirectories);
}
if (hasClsCompliance) {
- output.WriteBool(8, field_names[0], ClsCompliance);
+ output.WriteBool(8, field_names[1], ClsCompliance);
+ }
+ if (hasAddSerializable) {
+ output.WriteBool(9, field_names[0], AddSerializable);
}
if (hasFileExtension) {
- output.WriteString(221, field_names[3], FileExtension);
+ output.WriteString(221, field_names[4], FileExtension);
}
if (hasUmbrellaNamespace) {
- output.WriteString(222, field_names[12], UmbrellaNamespace);
+ output.WriteString(222, field_names[13], UmbrellaNamespace);
}
if (hasOutputDirectory) {
- output.WriteString(223, field_names[8], OutputDirectory);
+ output.WriteString(223, field_names[9], OutputDirectory);
}
if (hasIgnoreGoogleProtobuf) {
- output.WriteBool(224, field_names[4], IgnoreGoogleProtobuf);
+ output.WriteBool(224, field_names[5], IgnoreGoogleProtobuf);
}
if (hasServiceGeneratorType) {
- output.WriteEnum(225, field_names[10], (int) ServiceGeneratorType, ServiceGeneratorType);
+ output.WriteEnum(225, field_names[11], (int) ServiceGeneratorType, ServiceGeneratorType);
}
UnknownFields.WriteTo(output);
}
@@ -360,6 +375,9 @@
if (hasClsCompliance) {
size += pb::CodedOutputStream.ComputeBoolSize(8, ClsCompliance);
}
+ if (hasAddSerializable) {
+ size += pb::CodedOutputStream.ComputeBoolSize(9, AddSerializable);
+ }
if (hasFileExtension) {
size += pb::CodedOutputStream.ComputeStringSize(221, FileExtension);
}
@@ -525,6 +543,9 @@
if (other.HasClsCompliance) {
ClsCompliance = other.ClsCompliance;
}
+ if (other.HasAddSerializable) {
+ AddSerializable = other.AddSerializable;
+ }
if (other.HasFileExtension) {
FileExtension = other.FileExtension;
}
@@ -615,6 +636,10 @@
result.hasClsCompliance = input.ReadBool(ref result.clsCompliance_);
break;
}
+ case 72: {
+ result.hasAddSerializable = input.ReadBool(ref result.addSerializable_);
+ break;
+ }
case 1770: {
result.hasFileExtension = input.ReadString(ref result.fileExtension_);
break;
@@ -815,6 +840,26 @@
return this;
}
+ public bool HasAddSerializable {
+ get { return result.hasAddSerializable; }
+ }
+ public bool AddSerializable {
+ get { return result.AddSerializable; }
+ set { SetAddSerializable(value); }
+ }
+ public Builder SetAddSerializable(bool value) {
+ PrepareBuilder();
+ result.hasAddSerializable = true;
+ result.addSerializable_ = value;
+ return this;
+ }
+ public Builder ClearAddSerializable() {
+ PrepareBuilder();
+ result.hasAddSerializable = false;
+ result.addSerializable_ = false;
+ return this;
+ }
+
public bool HasFileExtension {
get { return result.hasFileExtension; }
}
@@ -927,6 +972,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpFieldOptions : pb::GeneratedMessage<CSharpFieldOptions, CSharpFieldOptions.Builder> {
+ private CSharpFieldOptions() { }
private static readonly CSharpFieldOptions defaultInstance = new CSharpFieldOptions().MakeReadOnly();
private static readonly string[] _cSharpFieldOptionsFieldNames = new string[] { "property_name" };
private static readonly uint[] _cSharpFieldOptionsFieldTags = new uint[] { 10 };
@@ -1201,6 +1247,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpServiceOptions : pb::GeneratedMessage<CSharpServiceOptions, CSharpServiceOptions.Builder> {
+ private CSharpServiceOptions() { }
private static readonly CSharpServiceOptions defaultInstance = new CSharpServiceOptions().MakeReadOnly();
private static readonly string[] _cSharpServiceOptionsFieldNames = new string[] { "interface_id" };
private static readonly uint[] _cSharpServiceOptionsFieldTags = new uint[] { 10 };
@@ -1475,6 +1522,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpMethodOptions : pb::GeneratedMessage<CSharpMethodOptions, CSharpMethodOptions.Builder> {
+ private CSharpMethodOptions() { }
private static readonly CSharpMethodOptions defaultInstance = new CSharpMethodOptions().MakeReadOnly();
private static readonly string[] _cSharpMethodOptionsFieldNames = new string[] { "dispatch_id" };
private static readonly uint[] _cSharpMethodOptionsFieldTags = new uint[] { 8 };
diff --git a/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs b/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
index 82bbd01..01048ed 100644
--- a/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
+++ b/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -233,6 +233,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FileDescriptorSet : pb::GeneratedMessage<FileDescriptorSet, FileDescriptorSet.Builder> {
+ private FileDescriptorSet() { }
private static readonly FileDescriptorSet defaultInstance = new FileDescriptorSet().MakeReadOnly();
private static readonly string[] _fileDescriptorSetFieldNames = new string[] { "file" };
private static readonly uint[] _fileDescriptorSetFieldTags = new uint[] { 10 };
@@ -424,7 +425,7 @@
if (other == global::Google.ProtocolBuffers.DescriptorProtos.FileDescriptorSet.DefaultInstance) return this;
PrepareBuilder();
if (other.file_.Count != 0) {
- base.AddRange(other.file_, result.file_);
+ result.file_.Add(other.file_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -518,7 +519,7 @@
}
public Builder AddRangeFile(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FileDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.file_);
+ result.file_.Add(values);
return this;
}
public Builder ClearFile() {
@@ -536,6 +537,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FileDescriptorProto : pb::GeneratedMessage<FileDescriptorProto, FileDescriptorProto.Builder> {
+ private FileDescriptorProto() { }
private static readonly FileDescriptorProto defaultInstance = new FileDescriptorProto().MakeReadOnly();
private static readonly string[] _fileDescriptorProtoFieldNames = new string[] { "dependency", "enum_type", "extension", "message_type", "name", "options", "package", "service" };
private static readonly uint[] _fileDescriptorProtoFieldTags = new uint[] { 26, 42, 58, 34, 10, 66, 18, 50 };
@@ -874,19 +876,19 @@
Package = other.Package;
}
if (other.dependency_.Count != 0) {
- base.AddRange(other.dependency_, result.dependency_);
+ result.dependency_.Add(other.dependency_);
}
if (other.messageType_.Count != 0) {
- base.AddRange(other.messageType_, result.messageType_);
+ result.messageType_.Add(other.messageType_);
}
if (other.enumType_.Count != 0) {
- base.AddRange(other.enumType_, result.enumType_);
+ result.enumType_.Add(other.enumType_);
}
if (other.service_.Count != 0) {
- base.AddRange(other.service_, result.service_);
+ result.service_.Add(other.service_);
}
if (other.extension_.Count != 0) {
- base.AddRange(other.extension_, result.extension_);
+ result.extension_.Add(other.extension_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -1046,7 +1048,7 @@
}
public Builder AddRangeDependency(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.dependency_);
+ result.dependency_.Add(values);
return this;
}
public Builder ClearDependency() {
@@ -1090,7 +1092,7 @@
}
public Builder AddRangeMessageType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.messageType_);
+ result.messageType_.Add(values);
return this;
}
public Builder ClearMessageType() {
@@ -1134,7 +1136,7 @@
}
public Builder AddRangeEnumType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.EnumDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.enumType_);
+ result.enumType_.Add(values);
return this;
}
public Builder ClearEnumType() {
@@ -1178,7 +1180,7 @@
}
public Builder AddRangeService(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.ServiceDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.service_);
+ result.service_.Add(values);
return this;
}
public Builder ClearService() {
@@ -1222,7 +1224,7 @@
}
public Builder AddRangeExtension(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.extension_);
+ result.extension_.Add(values);
return this;
}
public Builder ClearExtension() {
@@ -1280,6 +1282,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DescriptorProto : pb::GeneratedMessage<DescriptorProto, DescriptorProto.Builder> {
+ private DescriptorProto() { }
private static readonly DescriptorProto defaultInstance = new DescriptorProto().MakeReadOnly();
private static readonly string[] _descriptorProtoFieldNames = new string[] { "enum_type", "extension", "extension_range", "field", "name", "nested_type", "options" };
private static readonly uint[] _descriptorProtoFieldTags = new uint[] { 34, 50, 42, 18, 10, 26, 58 };
@@ -1312,6 +1315,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ExtensionRange : pb::GeneratedMessage<ExtensionRange, ExtensionRange.Builder> {
+ private ExtensionRange() { }
private static readonly ExtensionRange defaultInstance = new ExtensionRange().MakeReadOnly();
private static readonly string[] _extensionRangeFieldNames = new string[] { "end", "start" };
private static readonly uint[] _extensionRangeFieldTags = new uint[] { 16, 8 };
@@ -1918,19 +1922,19 @@
Name = other.Name;
}
if (other.field_.Count != 0) {
- base.AddRange(other.field_, result.field_);
+ result.field_.Add(other.field_);
}
if (other.extension_.Count != 0) {
- base.AddRange(other.extension_, result.extension_);
+ result.extension_.Add(other.extension_);
}
if (other.nestedType_.Count != 0) {
- base.AddRange(other.nestedType_, result.nestedType_);
+ result.nestedType_.Add(other.nestedType_);
}
if (other.enumType_.Count != 0) {
- base.AddRange(other.enumType_, result.enumType_);
+ result.enumType_.Add(other.enumType_);
}
if (other.extensionRange_.Count != 0) {
- base.AddRange(other.extensionRange_, result.extensionRange_);
+ result.extensionRange_.Add(other.extensionRange_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -2077,7 +2081,7 @@
}
public Builder AddRangeField(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.field_);
+ result.field_.Add(values);
return this;
}
public Builder ClearField() {
@@ -2121,7 +2125,7 @@
}
public Builder AddRangeExtension(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.extension_);
+ result.extension_.Add(values);
return this;
}
public Builder ClearExtension() {
@@ -2165,7 +2169,7 @@
}
public Builder AddRangeNestedType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.nestedType_);
+ result.nestedType_.Add(values);
return this;
}
public Builder ClearNestedType() {
@@ -2209,7 +2213,7 @@
}
public Builder AddRangeEnumType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.EnumDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.enumType_);
+ result.enumType_.Add(values);
return this;
}
public Builder ClearEnumType() {
@@ -2253,7 +2257,7 @@
}
public Builder AddRangeExtensionRange(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange> values) {
PrepareBuilder();
- base.AddRange(values, result.extensionRange_);
+ result.extensionRange_.Add(values);
return this;
}
public Builder ClearExtensionRange() {
@@ -2311,6 +2315,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FieldDescriptorProto : pb::GeneratedMessage<FieldDescriptorProto, FieldDescriptorProto.Builder> {
+ private FieldDescriptorProto() { }
private static readonly FieldDescriptorProto defaultInstance = new FieldDescriptorProto().MakeReadOnly();
private static readonly string[] _fieldDescriptorProtoFieldNames = new string[] { "default_value", "extendee", "label", "name", "number", "options", "type", "type_name" };
private static readonly uint[] _fieldDescriptorProtoFieldTags = new uint[] { 58, 18, 32, 10, 24, 66, 40, 50 };
@@ -2972,6 +2977,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class EnumDescriptorProto : pb::GeneratedMessage<EnumDescriptorProto, EnumDescriptorProto.Builder> {
+ private EnumDescriptorProto() { }
private static readonly EnumDescriptorProto defaultInstance = new EnumDescriptorProto().MakeReadOnly();
private static readonly string[] _enumDescriptorProtoFieldNames = new string[] { "name", "options", "value" };
private static readonly uint[] _enumDescriptorProtoFieldTags = new uint[] { 10, 26, 18 };
@@ -3201,7 +3207,7 @@
Name = other.Name;
}
if (other.value_.Count != 0) {
- base.AddRange(other.value_, result.value_);
+ result.value_.Add(other.value_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -3332,7 +3338,7 @@
}
public Builder AddRangeValue(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.EnumValueDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.value_);
+ result.value_.Add(values);
return this;
}
public Builder ClearValue() {
@@ -3390,6 +3396,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class EnumValueDescriptorProto : pb::GeneratedMessage<EnumValueDescriptorProto, EnumValueDescriptorProto.Builder> {
+ private EnumValueDescriptorProto() { }
private static readonly EnumValueDescriptorProto defaultInstance = new EnumValueDescriptorProto().MakeReadOnly();
private static readonly string[] _enumValueDescriptorProtoFieldNames = new string[] { "name", "number", "options" };
private static readonly uint[] _enumValueDescriptorProtoFieldTags = new uint[] { 10, 16, 26 };
@@ -3778,6 +3785,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ServiceDescriptorProto : pb::GeneratedMessage<ServiceDescriptorProto, ServiceDescriptorProto.Builder> {
+ private ServiceDescriptorProto() { }
private static readonly ServiceDescriptorProto defaultInstance = new ServiceDescriptorProto().MakeReadOnly();
private static readonly string[] _serviceDescriptorProtoFieldNames = new string[] { "method", "name", "options" };
private static readonly uint[] _serviceDescriptorProtoFieldTags = new uint[] { 18, 10, 26 };
@@ -4007,7 +4015,7 @@
Name = other.Name;
}
if (other.method_.Count != 0) {
- base.AddRange(other.method_, result.method_);
+ result.method_.Add(other.method_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -4138,7 +4146,7 @@
}
public Builder AddRangeMethod(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.MethodDescriptorProto> values) {
PrepareBuilder();
- base.AddRange(values, result.method_);
+ result.method_.Add(values);
return this;
}
public Builder ClearMethod() {
@@ -4196,6 +4204,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class MethodDescriptorProto : pb::GeneratedMessage<MethodDescriptorProto, MethodDescriptorProto.Builder> {
+ private MethodDescriptorProto() { }
private static readonly MethodDescriptorProto defaultInstance = new MethodDescriptorProto().MakeReadOnly();
private static readonly string[] _methodDescriptorProtoFieldNames = new string[] { "input_type", "name", "options", "output_type" };
private static readonly uint[] _methodDescriptorProtoFieldTags = new uint[] { 18, 10, 34, 26 };
@@ -4629,6 +4638,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FileOptions : pb::ExtendableMessage<FileOptions, FileOptions.Builder> {
+ private FileOptions() { }
private static readonly FileOptions defaultInstance = new FileOptions().MakeReadOnly();
private static readonly string[] _fileOptionsFieldNames = new string[] { "cc_generic_services", "java_generic_services", "java_multiple_files", "java_outer_classname", "java_package", "optimize_for", "py_generic_services", "uninterpreted_option" };
private static readonly uint[] _fileOptionsFieldTags = new uint[] { 128, 136, 80, 66, 10, 72, 144, 7994 };
@@ -4973,7 +4983,7 @@
PyGenericServices = other.PyGenericServices;
}
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -5246,7 +5256,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -5264,6 +5274,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class MessageOptions : pb::ExtendableMessage<MessageOptions, MessageOptions.Builder> {
+ private MessageOptions() { }
private static readonly MessageOptions defaultInstance = new MessageOptions().MakeReadOnly();
private static readonly string[] _messageOptionsFieldNames = new string[] { "message_set_wire_format", "no_standard_descriptor_accessor", "uninterpreted_option" };
private static readonly uint[] _messageOptionsFieldTags = new uint[] { 8, 16, 7994 };
@@ -5497,7 +5508,7 @@
NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor;
}
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -5640,7 +5651,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -5658,6 +5669,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FieldOptions : pb::ExtendableMessage<FieldOptions, FieldOptions.Builder> {
+ private FieldOptions() { }
private static readonly FieldOptions defaultInstance = new FieldOptions().MakeReadOnly();
private static readonly string[] _fieldOptionsFieldNames = new string[] { "ctype", "deprecated", "experimental_map_key", "packed", "uninterpreted_option" };
private static readonly uint[] _fieldOptionsFieldTags = new uint[] { 8, 24, 74, 16, 7994 };
@@ -5945,7 +5957,7 @@
ExperimentalMapKey = other.ExperimentalMapKey;
}
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -6145,7 +6157,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -6163,6 +6175,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class EnumOptions : pb::ExtendableMessage<EnumOptions, EnumOptions.Builder> {
+ private EnumOptions() { }
private static readonly EnumOptions defaultInstance = new EnumOptions().MakeReadOnly();
private static readonly string[] _enumOptionsFieldNames = new string[] { "uninterpreted_option" };
private static readonly uint[] _enumOptionsFieldTags = new uint[] { 7994 };
@@ -6358,7 +6371,7 @@
if (other == global::Google.ProtocolBuffers.DescriptorProtos.EnumOptions.DefaultInstance) return this;
PrepareBuilder();
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -6453,7 +6466,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -6471,6 +6484,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class EnumValueOptions : pb::ExtendableMessage<EnumValueOptions, EnumValueOptions.Builder> {
+ private EnumValueOptions() { }
private static readonly EnumValueOptions defaultInstance = new EnumValueOptions().MakeReadOnly();
private static readonly string[] _enumValueOptionsFieldNames = new string[] { "uninterpreted_option" };
private static readonly uint[] _enumValueOptionsFieldTags = new uint[] { 7994 };
@@ -6666,7 +6680,7 @@
if (other == global::Google.ProtocolBuffers.DescriptorProtos.EnumValueOptions.DefaultInstance) return this;
PrepareBuilder();
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -6761,7 +6775,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -6779,6 +6793,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ServiceOptions : pb::ExtendableMessage<ServiceOptions, ServiceOptions.Builder> {
+ private ServiceOptions() { }
private static readonly ServiceOptions defaultInstance = new ServiceOptions().MakeReadOnly();
private static readonly string[] _serviceOptionsFieldNames = new string[] { "uninterpreted_option" };
private static readonly uint[] _serviceOptionsFieldTags = new uint[] { 7994 };
@@ -6974,7 +6989,7 @@
if (other == global::Google.ProtocolBuffers.DescriptorProtos.ServiceOptions.DefaultInstance) return this;
PrepareBuilder();
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -7069,7 +7084,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -7087,6 +7102,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class MethodOptions : pb::ExtendableMessage<MethodOptions, MethodOptions.Builder> {
+ private MethodOptions() { }
private static readonly MethodOptions defaultInstance = new MethodOptions().MakeReadOnly();
private static readonly string[] _methodOptionsFieldNames = new string[] { "uninterpreted_option" };
private static readonly uint[] _methodOptionsFieldTags = new uint[] { 7994 };
@@ -7282,7 +7298,7 @@
if (other == global::Google.ProtocolBuffers.DescriptorProtos.MethodOptions.DefaultInstance) return this;
PrepareBuilder();
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -7377,7 +7393,7 @@
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
PrepareBuilder();
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -7395,6 +7411,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class UninterpretedOption : pb::GeneratedMessage<UninterpretedOption, UninterpretedOption.Builder> {
+ private UninterpretedOption() { }
private static readonly UninterpretedOption defaultInstance = new UninterpretedOption().MakeReadOnly();
private static readonly string[] _uninterpretedOptionFieldNames = new string[] { "double_value", "identifier_value", "name", "negative_int_value", "positive_int_value", "string_value" };
private static readonly uint[] _uninterpretedOptionFieldTags = new uint[] { 49, 26, 18, 40, 32, 58 };
@@ -7427,6 +7444,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NamePart : pb::GeneratedMessage<NamePart, NamePart.Builder> {
+ private NamePart() { }
private static readonly NamePart defaultInstance = new NamePart().MakeReadOnly();
private static readonly string[] _namePartFieldNames = new string[] { "is_extension", "name_part" };
private static readonly uint[] _namePartFieldTags = new uint[] { 16, 10 };
@@ -7994,7 +8012,7 @@
if (other == global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.DefaultInstance) return this;
PrepareBuilder();
if (other.name_.Count != 0) {
- base.AddRange(other.name_, result.name_);
+ result.name_.Add(other.name_);
}
if (other.HasIdentifierValue) {
IdentifierValue = other.IdentifierValue;
@@ -8123,7 +8141,7 @@
}
public Builder AddRangeName(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart> values) {
PrepareBuilder();
- base.AddRange(values, result.name_);
+ result.name_.Add(values);
return this;
}
public Builder ClearName() {
diff --git a/src/ProtocolBuffers/DynamicMessage.cs b/src/ProtocolBuffers/DynamicMessage.cs
index 6235eb5..e39efb1 100644
--- a/src/ProtocolBuffers/DynamicMessage.cs
+++ b/src/ProtocolBuffers/DynamicMessage.cs
@@ -44,7 +44,7 @@
/// <summary>
/// An implementation of IMessage that can represent arbitrary types, given a MessageaDescriptor.
/// </summary>
- public sealed class DynamicMessage : AbstractMessage<DynamicMessage, DynamicMessage.Builder>
+ public sealed partial class DynamicMessage : AbstractMessage<DynamicMessage, DynamicMessage.Builder>
{
private readonly MessageDescriptor type;
private readonly FieldSet fields;
@@ -308,7 +308,7 @@
/// <summary>
/// Builder for dynamic messages. Instances are created with DynamicMessage.CreateBuilder.
/// </summary>
- public sealed class Builder : AbstractBuilder<DynamicMessage, Builder>
+ public sealed partial class Builder : AbstractBuilder<DynamicMessage, Builder>
{
private readonly MessageDescriptor type;
private FieldSet fields;
diff --git a/src/ProtocolBuffers/ExtendableBuilder.cs b/src/ProtocolBuffers/ExtendableBuilder.cs
index 137762a..111ff57 100644
--- a/src/ProtocolBuffers/ExtendableBuilder.cs
+++ b/src/ProtocolBuffers/ExtendableBuilder.cs
@@ -40,7 +40,7 @@
namespace Google.ProtocolBuffers
{
- public abstract class ExtendableBuilder<TMessage, TBuilder> : GeneratedBuilder<TMessage, TBuilder>
+ public abstract partial class ExtendableBuilder<TMessage, TBuilder> : GeneratedBuilder<TMessage, TBuilder>
where TMessage : ExtendableMessage<TMessage, TBuilder>
where TBuilder : GeneratedBuilder<TMessage, TBuilder>, new()
{
diff --git a/src/ProtocolBuffers/ExtendableBuilderLite.cs b/src/ProtocolBuffers/ExtendableBuilderLite.cs
index cdec4fa..2a71aa4 100644
--- a/src/ProtocolBuffers/ExtendableBuilderLite.cs
+++ b/src/ProtocolBuffers/ExtendableBuilderLite.cs
@@ -40,7 +40,7 @@
namespace Google.ProtocolBuffers
{
- public abstract class ExtendableBuilderLite<TMessage, TBuilder> : GeneratedBuilderLite<TMessage, TBuilder>
+ public abstract partial class ExtendableBuilderLite<TMessage, TBuilder> : GeneratedBuilderLite<TMessage, TBuilder>
where TMessage : ExtendableMessageLite<TMessage, TBuilder>
where TBuilder : GeneratedBuilderLite<TMessage, TBuilder>
{
diff --git a/src/ProtocolBuffers/ExtendableMessage.cs b/src/ProtocolBuffers/ExtendableMessage.cs
index e8f9ce4..71cd1b3 100644
--- a/src/ProtocolBuffers/ExtendableMessage.cs
+++ b/src/ProtocolBuffers/ExtendableMessage.cs
@@ -41,7 +41,7 @@
namespace Google.ProtocolBuffers
{
- public abstract class ExtendableMessage<TMessage, TBuilder> : GeneratedMessage<TMessage, TBuilder>
+ public abstract partial class ExtendableMessage<TMessage, TBuilder> : GeneratedMessage<TMessage, TBuilder>
where TMessage : GeneratedMessage<TMessage, TBuilder>
where TBuilder : GeneratedBuilder<TMessage, TBuilder>, new()
{
diff --git a/src/ProtocolBuffers/ExtendableMessageLite.cs b/src/ProtocolBuffers/ExtendableMessageLite.cs
index 6ff5656..e682475 100644
--- a/src/ProtocolBuffers/ExtendableMessageLite.cs
+++ b/src/ProtocolBuffers/ExtendableMessageLite.cs
@@ -42,7 +42,7 @@
namespace Google.ProtocolBuffers
{
- public abstract class ExtendableMessageLite<TMessage, TBuilder> : GeneratedMessageLite<TMessage, TBuilder>
+ public abstract partial class ExtendableMessageLite<TMessage, TBuilder> : GeneratedMessageLite<TMessage, TBuilder>
where TMessage : GeneratedMessageLite<TMessage, TBuilder>
where TBuilder : GeneratedBuilderLite<TMessage, TBuilder>
{
diff --git a/src/ProtocolBuffers/GeneratedBuilder.cs b/src/ProtocolBuffers/GeneratedBuilder.cs
index 2472d2b..fd6fe4d 100644
--- a/src/ProtocolBuffers/GeneratedBuilder.cs
+++ b/src/ProtocolBuffers/GeneratedBuilder.cs
@@ -47,7 +47,7 @@
/// most of the IBuilder interface using reflection. Users can ignore this class
/// as an implementation detail.
/// </summary>
- public abstract class GeneratedBuilder<TMessage, TBuilder> : AbstractBuilder<TMessage, TBuilder>
+ public abstract partial class GeneratedBuilder<TMessage, TBuilder> : AbstractBuilder<TMessage, TBuilder>
where TMessage : GeneratedMessage<TMessage, TBuilder>
where TBuilder : GeneratedBuilder<TMessage, TBuilder>, new()
{
@@ -80,32 +80,6 @@
}
/// <summary>
- /// Adds all of the specified values to the given collection.
- /// </summary>
- /// <exception cref="ArgumentNullException">Any element of the list is null</exception>
- protected void AddRange<T>(IEnumerable<T> source, IList<T> destination)
- {
- ThrowHelper.ThrowIfNull(source);
- // We only need to check this for nullable types.
- if (default(T) == null)
- {
- ThrowHelper.ThrowIfAnyNull(source);
- }
- List<T> list = destination as List<T>;
- if (list != null)
- {
- list.AddRange(source);
- }
- else
- {
- foreach (T element in source)
- {
- destination.Add(element);
- }
- }
- }
-
- /// <summary>
/// Called by derived classes to parse an unknown field.
/// </summary>
/// <returns>true unless the tag is an end-group tag</returns>
diff --git a/src/ProtocolBuffers/GeneratedBuilderLite.cs b/src/ProtocolBuffers/GeneratedBuilderLite.cs
index 165edc1..4030e80 100644
--- a/src/ProtocolBuffers/GeneratedBuilderLite.cs
+++ b/src/ProtocolBuffers/GeneratedBuilderLite.cs
@@ -44,7 +44,7 @@
/// most of the IBuilder interface using reflection. Users can ignore this class
/// as an implementation detail.
/// </summary>
- public abstract class GeneratedBuilderLite<TMessage, TBuilder> : AbstractBuilderLite<TMessage, TBuilder>
+ public abstract partial class GeneratedBuilderLite<TMessage, TBuilder> : AbstractBuilderLite<TMessage, TBuilder>
where TMessage : GeneratedMessageLite<TMessage, TBuilder>
where TBuilder : GeneratedBuilderLite<TMessage, TBuilder>
{
@@ -62,32 +62,6 @@
public abstract TBuilder MergeFrom(TMessage other);
/// <summary>
- /// Adds all of the specified values to the given collection.
- /// </summary>
- /// <exception cref="ArgumentNullException">Any element of the list is null</exception>
- protected void AddRange<T>(IEnumerable<T> source, IList<T> destination)
- {
- ThrowHelper.ThrowIfNull(source);
- // We only need to check this for nullable types.
- if (default(T) == null)
- {
- ThrowHelper.ThrowIfAnyNull(source);
- }
- List<T> list = destination as List<T>;
- if (list != null)
- {
- list.AddRange(source);
- }
- else
- {
- foreach (T element in source)
- {
- destination.Add(element);
- }
- }
- }
-
- /// <summary>
/// Called by derived classes to parse an unknown field.
/// </summary>
/// <returns>true unless the tag is an end-group tag</returns>
diff --git a/src/ProtocolBuffers/GeneratedMessage.cs b/src/ProtocolBuffers/GeneratedMessage.cs
index ce755be..6f4b665 100644
--- a/src/ProtocolBuffers/GeneratedMessage.cs
+++ b/src/ProtocolBuffers/GeneratedMessage.cs
@@ -50,7 +50,7 @@
/// most of the IMessage interface using reflection. Users
/// can ignore this class as an implementation detail.
/// </summary>
- public abstract class GeneratedMessage<TMessage, TBuilder> : AbstractMessage<TMessage, TBuilder>
+ public abstract partial class GeneratedMessage<TMessage, TBuilder> : AbstractMessage<TMessage, TBuilder>
where TMessage : GeneratedMessage<TMessage, TBuilder>
where TBuilder : GeneratedBuilder<TMessage, TBuilder>, new()
{
diff --git a/src/ProtocolBuffers/GeneratedMessageLite.cs b/src/ProtocolBuffers/GeneratedMessageLite.cs
index 1406d30..aecba7d 100644
--- a/src/ProtocolBuffers/GeneratedMessageLite.cs
+++ b/src/ProtocolBuffers/GeneratedMessageLite.cs
@@ -47,7 +47,7 @@
/// most of the IMessage interface using reflection. Users
/// can ignore this class as an implementation detail.
/// </summary>
- public abstract class GeneratedMessageLite<TMessage, TBuilder> : AbstractMessageLite<TMessage, TBuilder>
+ public abstract partial class GeneratedMessageLite<TMessage, TBuilder> : AbstractMessageLite<TMessage, TBuilder>
where TMessage : GeneratedMessageLite<TMessage, TBuilder>
where TBuilder : GeneratedBuilderLite<TMessage, TBuilder>
{
diff --git a/src/ProtocolBuffers/IBuilderLite.cs b/src/ProtocolBuffers/IBuilderLite.cs
index 801f8e2..330fe49 100644
--- a/src/ProtocolBuffers/IBuilderLite.cs
+++ b/src/ProtocolBuffers/IBuilderLite.cs
@@ -46,7 +46,7 @@
/// use explicit interface implemenation for the non-generic form. This mirrors
/// how IEnumerable and IEnumerable<T> work.
/// </summary>
- public interface IBuilderLite
+ public partial interface IBuilderLite
{
/// <summary>
/// Returns true iff all required fields in the message and all
diff --git a/src/ProtocolBuffers/IMessageLite.cs b/src/ProtocolBuffers/IMessageLite.cs
index 90fb950..ea5d994 100644
--- a/src/ProtocolBuffers/IMessageLite.cs
+++ b/src/ProtocolBuffers/IMessageLite.cs
@@ -42,7 +42,7 @@
/// Non-generic interface used for all parts of the API which don't require
/// any type knowledge.
/// </summary>
- public interface IMessageLite
+ public partial interface IMessageLite
{
/// <summary>
/// Returns true iff all required fields in the message and all embedded
diff --git a/src/ProtocolBuffers/IRpcController.cs b/src/ProtocolBuffers/IRpcController.cs
index f6220e3..b155bec 100644
--- a/src/ProtocolBuffers/IRpcController.cs
+++ b/src/ProtocolBuffers/IRpcController.cs
@@ -105,7 +105,7 @@
/// well give up on replying to it. This method must be called on the server
/// side only. The server should still call the final "done" callback.
/// </summary>
- bool isCanceled();
+ bool IsCanceled();
/// <summary>
/// Requests that the given callback be called when the RPC is canceled.
diff --git a/src/ProtocolBuffers/IRpcDispatch.cs b/src/ProtocolBuffers/IRpcDispatch.cs
index 1da5c80..524838e 100644
--- a/src/ProtocolBuffers/IRpcDispatch.cs
+++ b/src/ProtocolBuffers/IRpcDispatch.cs
@@ -34,18 +34,42 @@
#endregion
+using System;
+
namespace Google.ProtocolBuffers
{
/// <summary>
- ///
+ /// Provides an entry-point for transport listeners to call a specified method on a service
/// </summary>
- public interface IRpcServerStub
+ public interface IRpcServerStub : IDisposable
{
+ /// <summary>
+ /// Calls the method identified by methodName and returns the message
+ /// </summary>
+ /// <param name="methodName">The method name on the service descriptor (case-sensitive)</param>
+ /// <param name="input">The ICodedInputStream to deserialize the call parameter from</param>
+ /// <param name="registry">The extension registry to use when deserializing the call parameter</param>
+ /// <returns>The message that was returned from the service's method</returns>
IMessageLite CallMethod(string methodName, ICodedInputStream input, ExtensionRegistry registry);
}
+ /// <summary>
+ /// Used to forward an invocation of a service method to a transport sender implementation
+ /// </summary>
public interface IRpcDispatch
{
+ /// <summary>
+ /// Calls the service member on the endpoint connected. This is generally done by serializing
+ /// the message, sending the bytes over a transport, and then deserializing the call parameter
+ /// to invoke the service's actual implementation via IRpcServerStub. Once the call has
+ /// completed the result message is serialized and returned to the originating endpoint.
+ /// </summary>
+ /// <typeparam name="TMessage">The type of the response message</typeparam>
+ /// <typeparam name="TBuilder">The type of of the response builder</typeparam>
+ /// <param name="method">The name of the method on the service</param>
+ /// <param name="request">The message instance provided to the service call</param>
+ /// <param name="response">The builder used to deserialize the response</param>
+ /// <returns>The resulting message of the service call</returns>
TMessage CallMethod<TMessage, TBuilder>(string method, IMessageLite request,
IBuilderLite<TMessage, TBuilder> response)
where TMessage : IMessageLite<TMessage, TBuilder>
diff --git a/src/ProtocolBuffers/ProtocolBuffers.csproj b/src/ProtocolBuffers/ProtocolBuffers.csproj
index 336b387..be80bd3 100644
--- a/src/ProtocolBuffers/ProtocolBuffers.csproj
+++ b/src/ProtocolBuffers/ProtocolBuffers.csproj
@@ -105,6 +105,7 @@
<Compile Include="Collections\IPopsicleList.cs" />
<Compile Include="Collections\PopsicleList.cs" />
<Compile Include="CodedOutputStream.ComputeSize.cs" />
+ <Compile Include="CustomSerialization.cs" />
<Compile Include="Delegates.cs" />
<Compile Include="CodedInputStream.cs" />
<Compile Include="CodedOutputStream.cs" />
diff --git a/src/ProtocolBuffers/ProtocolBuffersLite.csproj b/src/ProtocolBuffers/ProtocolBuffersLite.csproj
index 44c9255..e2d4478 100644
--- a/src/ProtocolBuffers/ProtocolBuffersLite.csproj
+++ b/src/ProtocolBuffers/ProtocolBuffersLite.csproj
@@ -86,6 +86,7 @@
<Compile Include="Collections\Lists.cs" />
<Compile Include="Collections\PopsicleList.cs" />
<Compile Include="Collections\ReadOnlyDictionary.cs" />
+ <Compile Include="CustomSerialization.cs" />
<Compile Include="Descriptors\FieldMappingAttribute.cs" />
<Compile Include="Descriptors\FieldType.cs" />
<Compile Include="Descriptors\MappedType.cs" />
diff --git a/src/ProtocolBuffers/UnknownFieldSet.cs b/src/ProtocolBuffers/UnknownFieldSet.cs
index 9261dba..09ed680 100644
--- a/src/ProtocolBuffers/UnknownFieldSet.cs
+++ b/src/ProtocolBuffers/UnknownFieldSet.cs
@@ -53,7 +53,7 @@
///
/// Most users will never need to use this class directly.
/// </summary>
- public sealed class UnknownFieldSet : IMessageLite
+ public sealed partial class UnknownFieldSet : IMessageLite
{
private static readonly UnknownFieldSet defaultInstance =
new UnknownFieldSet(new Dictionary<int, UnknownField>());
@@ -314,7 +314,7 @@
/// <summary>
/// Builder for UnknownFieldSets.
/// </summary>
- public sealed class Builder : IBuilderLite
+ public sealed partial class Builder : IBuilderLite
{
/// <summary>
/// Mapping from number to field. Note that by using a SortedList we ensure
diff --git a/src/ProtocolBuffers2008.sln b/src/ProtocolBuffers2008.sln
index 0baadba..26924c6 100644
--- a/src/ProtocolBuffers2008.sln
+++ b/src/ProtocolBuffers2008.sln
@@ -23,7 +23,6 @@
..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
- ..\protos\extest\unittest_issues.proto = ..\protos\extest\unittest_issues.proto
..\protos\google\protobuf\unittest_lite.proto = ..\protos\google\protobuf\unittest_lite.proto
..\protos\google\protobuf\unittest_lite_imports_nonlite.proto = ..\protos\google\protobuf\unittest_lite_imports_nonlite.proto
..\protos\google\protobuf\unittest_mset.proto = ..\protos\google\protobuf\unittest_mset.proto
diff --git a/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj b/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
index 2b8fe7c..8da5b26 100644
--- a/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
+++ b/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
@@ -61,6 +61,7 @@
<Compile Include="ExtendableBuilderLiteTest.cs" />
<Compile Include="ExtendableMessageLiteTest.cs" />
<Compile Include="LiteTest.cs" />
+ <Compile Include="SerializableLiteTest.cs" />
<Compile Include="TestLiteByApi.cs" />
<Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
<Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
diff --git a/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs b/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs
new file mode 100644
index 0000000..7c12ef4
--- /dev/null
+++ b/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.Text;
+using Google.ProtocolBuffers.TestProtos;
+using NUnit.Framework;
+
+namespace Google.ProtocolBuffers
+{
+ [TestFixture]
+ public class SerializableLiteTest
+ {
+ /// <summary>
+ /// Just keep it from even compiling if we these objects don't implement the expected interface.
+ /// </summary>
+ public static readonly ISerializable CompileTimeCheckSerializableMessage = TestRequiredLite.DefaultInstance;
+ public static readonly ISerializable CompileTimeCheckSerializableBuilder = new TestRequiredLite.Builder();
+
+ [Test]
+ public void TestPlainMessage()
+ {
+ TestRequiredLite message = TestRequiredLite.CreateBuilder()
+ .SetD(42)
+ .BuildPartial();
+
+ MemoryStream ms = new MemoryStream();
+ new BinaryFormatter().Serialize(ms, message);
+
+ ms.Position = 0;
+ TestRequiredLite copy = (TestRequiredLite)new BinaryFormatter().Deserialize(ms);
+
+ Assert.AreEqual(message, copy);
+ }
+
+ [Test]
+ public void TestPlainBuilder()
+ {
+ TestRequiredLite.Builder builder = TestRequiredLite.CreateBuilder()
+ .SetD(42)
+ ;
+
+ MemoryStream ms = new MemoryStream();
+ new BinaryFormatter().Serialize(ms, builder);
+
+ ms.Position = 0;
+ TestRequiredLite.Builder copy = (TestRequiredLite.Builder)new BinaryFormatter().Deserialize(ms);
+
+ Assert.AreEqual(builder.BuildPartial(), copy.BuildPartial());
+ }
+ }
+}
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs
index 5267bf3..ba46dc6 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -128,6 +128,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestInteropPerson : pb::ExtendableMessage<TestInteropPerson, TestInteropPerson.Builder> {
+ private TestInteropPerson() { }
private static readonly TestInteropPerson defaultInstance = new TestInteropPerson().MakeReadOnly();
public static TestInteropPerson DefaultInstance {
get { return defaultInstance; }
@@ -166,6 +167,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class PhoneNumber : pb::GeneratedMessage<PhoneNumber, PhoneNumber.Builder> {
+ private PhoneNumber() { }
private static readonly PhoneNumber defaultInstance = new PhoneNumber().MakeReadOnly();
public static PhoneNumber DefaultInstance {
get { return defaultInstance; }
@@ -366,6 +368,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Addresses : pb::GeneratedMessage<Addresses, Addresses.Builder> {
+ private Addresses() { }
private static readonly Addresses defaultInstance = new Addresses().MakeReadOnly();
public static Addresses DefaultInstance {
get { return defaultInstance; }
@@ -922,7 +925,7 @@
}
public Builder AddRangeCodes(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.codes_);
+ result.codes_.Add(values);
return this;
}
public Builder ClearCodes() {
@@ -966,7 +969,7 @@
}
public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPerson.Types.PhoneNumber> values) {
PrepareBuilder();
- base.AddRange(values, result.phone_);
+ result.phone_.Add(values);
return this;
}
public Builder ClearPhone() {
@@ -1010,7 +1013,7 @@
}
public Builder AddRangeAddresses(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPerson.Types.Addresses> values) {
PrepareBuilder();
- base.AddRange(values, result.addresses_);
+ result.addresses_.Add(values);
return this;
}
public Builder ClearAddresses() {
@@ -1028,6 +1031,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestInteropEmployeeId : pb::GeneratedMessage<TestInteropEmployeeId, TestInteropEmployeeId.Builder> {
+ private TestInteropEmployeeId() { }
private static readonly TestInteropEmployeeId defaultInstance = new TestInteropEmployeeId().MakeReadOnly();
public static TestInteropEmployeeId DefaultInstance {
get { return defaultInstance; }
@@ -1198,6 +1202,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMissingFieldsA : pb::GeneratedMessage<TestMissingFieldsA, TestMissingFieldsA.Builder> {
+ private TestMissingFieldsA() { }
private static readonly TestMissingFieldsA defaultInstance = new TestMissingFieldsA().MakeReadOnly();
public static TestMissingFieldsA DefaultInstance {
get { return defaultInstance; }
@@ -1228,6 +1233,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SubA : pb::GeneratedMessage<SubA, SubA.Builder> {
+ private SubA() { }
private static readonly SubA defaultInstance = new SubA().MakeReadOnly();
public static SubA DefaultInstance {
get { return defaultInstance; }
@@ -1424,7 +1430,7 @@
}
public Builder AddRangeValues(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.values_);
+ result.values_.Add(values);
return this;
}
public Builder ClearValues() {
@@ -1701,6 +1707,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMissingFieldsB : pb::GeneratedMessage<TestMissingFieldsB, TestMissingFieldsB.Builder> {
+ private TestMissingFieldsB() { }
private static readonly TestMissingFieldsB defaultInstance = new TestMissingFieldsB().MakeReadOnly();
public static TestMissingFieldsB DefaultInstance {
get { return defaultInstance; }
@@ -1731,6 +1738,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class SubB : pb::GeneratedMessage<SubB, SubB.Builder> {
+ private SubB() { }
private static readonly SubB defaultInstance = new SubB().MakeReadOnly();
public static SubB DefaultInstance {
get { return defaultInstance; }
@@ -1897,7 +1905,7 @@
}
public Builder AddRangeValues(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.values_);
+ result.values_.Add(values);
return this;
}
public Builder ClearValues() {
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
index d070aed..e3df232 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -55,10 +55,12 @@
#endregion
#region Messages
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRequiredLite : pb::GeneratedMessageLite<TestRequiredLite, TestRequiredLite.Builder> {
+ private TestRequiredLite() { }
private static readonly TestRequiredLite defaultInstance = new TestRequiredLite().MakeReadOnly();
private static readonly string[] _testRequiredLiteFieldNames = new string[] { "d", "en" };
private static readonly uint[] _testRequiredLiteFieldTags = new uint[] { 8, 16 };
@@ -194,6 +196,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -371,10 +374,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestInteropPersonLite : pb::ExtendableMessageLite<TestInteropPersonLite, TestInteropPersonLite.Builder> {
+ private TestInteropPersonLite() { }
private static readonly TestInteropPersonLite defaultInstance = new TestInteropPersonLite().MakeReadOnly();
private static readonly string[] _testInteropPersonLiteFieldNames = new string[] { "addresses", "codes", "email", "id", "name", "phone" };
private static readonly uint[] _testInteropPersonLiteFieldTags = new uint[] { 43, 82, 26, 16, 10, 34 };
@@ -403,10 +408,12 @@
WORK = 2,
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class PhoneNumber : pb::GeneratedMessageLite<PhoneNumber, PhoneNumber.Builder> {
+ private PhoneNumber() { }
private static readonly PhoneNumber defaultInstance = new PhoneNumber().MakeReadOnly();
private static readonly string[] _phoneNumberFieldNames = new string[] { "number", "type" };
private static readonly uint[] _phoneNumberFieldTags = new uint[] { 10, 16 };
@@ -541,6 +548,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -719,10 +727,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Addresses : pb::GeneratedMessageLite<Addresses, Addresses.Builder> {
+ private Addresses() { }
private static readonly Addresses defaultInstance = new Addresses().MakeReadOnly();
private static readonly string[] _addressesFieldNames = new string[] { "address", "address2", "city", "state", "zip" };
private static readonly uint[] _addressesFieldTags = new uint[] { 10, 18, 26, 34, 45 };
@@ -918,6 +928,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -1414,6 +1425,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
@@ -1499,13 +1511,13 @@
Email = other.Email;
}
if (other.codes_.Count != 0) {
- base.AddRange(other.codes_, result.codes_);
+ result.codes_.Add(other.codes_);
}
if (other.phone_.Count != 0) {
- base.AddRange(other.phone_, result.phone_);
+ result.phone_.Add(other.phone_);
}
if (other.addresses_.Count != 0) {
- base.AddRange(other.addresses_, result.addresses_);
+ result.addresses_.Add(other.addresses_);
}
this.MergeExtensionFields(other);
return this;
@@ -1655,7 +1667,7 @@
}
public Builder AddRangeCodes(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.codes_);
+ result.codes_.Add(values);
return this;
}
public Builder ClearCodes() {
@@ -1699,7 +1711,7 @@
}
public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.PhoneNumber> values) {
PrepareBuilder();
- base.AddRange(values, result.phone_);
+ result.phone_.Add(values);
return this;
}
public Builder ClearPhone() {
@@ -1743,7 +1755,7 @@
}
public Builder AddRangeAddresses(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.Addresses> values) {
PrepareBuilder();
- base.AddRange(values, result.addresses_);
+ result.addresses_.Add(values);
return this;
}
public Builder ClearAddresses() {
@@ -1757,10 +1769,12 @@
}
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestInteropEmployeeIdLite : pb::GeneratedMessageLite<TestInteropEmployeeIdLite, TestInteropEmployeeIdLite.Builder> {
+ private TestInteropEmployeeIdLite() { }
private static readonly TestInteropEmployeeIdLite defaultInstance = new TestInteropEmployeeIdLite().MakeReadOnly();
private static readonly string[] _testInteropEmployeeIdLiteFieldNames = new string[] { "number" };
private static readonly uint[] _testInteropEmployeeIdLiteFieldTags = new uint[] { 10 };
@@ -1876,6 +1890,7 @@
return new Builder(prototype);
}
+ [global::System.SerializableAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
index 3eb3062..f31fdd8 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -43,6 +43,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> {
+ private ImportMessageLite() { }
private static readonly ImportMessageLite defaultInstance = new ImportMessageLite().MakeReadOnly();
private static readonly string[] _importMessageLiteFieldNames = new string[] { "d" };
private static readonly uint[] _importMessageLiteFieldTags = new uint[] { 8 };
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
index 6f7f59d..c12aef8 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -71,6 +71,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
+ private ImportMessage() { }
private static readonly ImportMessage defaultInstance = new ImportMessage().MakeReadOnly();
private static readonly string[] _importMessageFieldNames = new string[] { "d" };
private static readonly uint[] _importMessageFieldTags = new uint[] { 8 };
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
index 34ae37f..0e7b507 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -32,6 +32,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessageLite<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> {
+ private TestLiteImportsNonlite() { }
private static readonly TestLiteImportsNonlite defaultInstance = new TestLiteImportsNonlite().MakeReadOnly();
private static readonly string[] _testLiteImportsNonliteFieldNames = new string[] { "message" };
private static readonly uint[] _testLiteImportsNonliteFieldTags = new uint[] { 10 };
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
index 5ad7558..c682ad1 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -1228,6 +1228,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestAllTypesLite : pb::GeneratedMessageLite<TestAllTypesLite, TestAllTypesLite.Builder> {
+ private TestAllTypesLite() { }
private static readonly TestAllTypesLite defaultInstance = new TestAllTypesLite().MakeReadOnly();
private static readonly string[] _testAllTypesLiteFieldNames = new string[] { "default_bool", "default_bytes", "default_cord", "default_double", "default_fixed32", "default_fixed64", "default_float", "default_foreign_enum", "default_import_enum", "default_int32", "default_int64", "default_nested_enum", "default_sfixed32", "default_sfixed64", "default_sint32", "default_sint64", "default_string", "default_string_piece", "default_uint32", "default_uint64", "optional_bool", "optional_bytes", "optional_cord", "optional_double", "optional_fixed32", "optional_fixed64", "optional_float", "optional_foreign_enum", "optional_foreign_message", "optional_import_enum", "optional_import_message", "optional_int32", "optional_int64", "optional_nested_enum", "optional_nested_message", "optional_sfixed32", "optional_sfixed64", "optional_sint32", "optional_sint64", "optional_string", "optional_string_piece", "optional_uint32", "optional_uint64", "optionalgroup", "repeated_bool", "repeated_bytes", "repeated_cord", "repeated_double", "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_foreign_enum", "repeated_foreign_message", "repeated_import_enum", "repeated_import_message", "repeated_int32", "repeated_int64", "repeated_nested_enum", "repeated_nested_message", "repeated_sfixed32", "repeated_sfixed64", "repeated_sint32", "repeated_sint64", "repeated_string", "repeated_string_piece", "repeated_uint32", "repeated_uint64", "repeatedgroup" };
private static readonly uint[] _testAllTypesLiteFieldTags = new uint[] { 584, 602, 682, 577, 541, 545, 573, 656, 664, 488, 496, 648, 557, 561, 520, 528, 594, 674, 504, 512, 104, 122, 202, 97, 61, 65, 93, 176, 154, 184, 162, 8, 16, 168, 146, 77, 81, 40, 48, 114, 194, 24, 32, 131, 344, 362, 442, 337, 301, 305, 333, 416, 394, 424, 402, 248, 256, 408, 386, 317, 321, 280, 288, 354, 434, 264, 272, 371 };
@@ -1260,6 +1261,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NestedMessage : pb::GeneratedMessageLite<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
private static readonly string[] _nestedMessageFieldNames = new string[] { "bb" };
private static readonly uint[] _nestedMessageFieldTags = new uint[] { 8 };
@@ -1524,6 +1526,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionalGroup : pb::GeneratedMessageLite<OptionalGroup, OptionalGroup.Builder> {
+ private OptionalGroup() { }
private static readonly OptionalGroup defaultInstance = new OptionalGroup().MakeReadOnly();
private static readonly string[] _optionalGroupFieldNames = new string[] { "a" };
private static readonly uint[] _optionalGroupFieldTags = new uint[] { 136 };
@@ -1788,6 +1791,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RepeatedGroup : pb::GeneratedMessageLite<RepeatedGroup, RepeatedGroup.Builder> {
+ private RepeatedGroup() { }
private static readonly RepeatedGroup defaultInstance = new RepeatedGroup().MakeReadOnly();
private static readonly string[] _repeatedGroupFieldNames = new string[] { "a" };
private static readonly uint[] _repeatedGroupFieldTags = new uint[] { 376 };
@@ -3823,76 +3827,76 @@
OptionalCord = other.OptionalCord;
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedUint32_.Count != 0) {
- base.AddRange(other.repeatedUint32_, result.repeatedUint32_);
+ result.repeatedUint32_.Add(other.repeatedUint32_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
if (other.repeatedSint32_.Count != 0) {
- base.AddRange(other.repeatedSint32_, result.repeatedSint32_);
+ result.repeatedSint32_.Add(other.repeatedSint32_);
}
if (other.repeatedSint64_.Count != 0) {
- base.AddRange(other.repeatedSint64_, result.repeatedSint64_);
+ result.repeatedSint64_.Add(other.repeatedSint64_);
}
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedSfixed32_.Count != 0) {
- base.AddRange(other.repeatedSfixed32_, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
}
if (other.repeatedSfixed64_.Count != 0) {
- base.AddRange(other.repeatedSfixed64_, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedDouble_.Count != 0) {
- base.AddRange(other.repeatedDouble_, result.repeatedDouble_);
+ result.repeatedDouble_.Add(other.repeatedDouble_);
}
if (other.repeatedBool_.Count != 0) {
- base.AddRange(other.repeatedBool_, result.repeatedBool_);
+ result.repeatedBool_.Add(other.repeatedBool_);
}
if (other.repeatedString_.Count != 0) {
- base.AddRange(other.repeatedString_, result.repeatedString_);
+ result.repeatedString_.Add(other.repeatedString_);
}
if (other.repeatedBytes_.Count != 0) {
- base.AddRange(other.repeatedBytes_, result.repeatedBytes_);
+ result.repeatedBytes_.Add(other.repeatedBytes_);
}
if (other.repeatedGroup_.Count != 0) {
- base.AddRange(other.repeatedGroup_, result.repeatedGroup_);
+ result.repeatedGroup_.Add(other.repeatedGroup_);
}
if (other.repeatedNestedMessage_.Count != 0) {
- base.AddRange(other.repeatedNestedMessage_, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
}
if (other.repeatedForeignMessage_.Count != 0) {
- base.AddRange(other.repeatedForeignMessage_, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
}
if (other.repeatedImportMessage_.Count != 0) {
- base.AddRange(other.repeatedImportMessage_, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
}
if (other.repeatedNestedEnum_.Count != 0) {
- base.AddRange(other.repeatedNestedEnum_, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
}
if (other.repeatedForeignEnum_.Count != 0) {
- base.AddRange(other.repeatedForeignEnum_, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
}
if (other.repeatedImportEnum_.Count != 0) {
- base.AddRange(other.repeatedImportEnum_, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
}
if (other.repeatedStringPiece_.Count != 0) {
- base.AddRange(other.repeatedStringPiece_, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
}
if (other.repeatedCord_.Count != 0) {
- base.AddRange(other.repeatedCord_, result.repeatedCord_);
+ result.repeatedCord_.Add(other.repeatedCord_);
}
if (other.HasDefaultInt32) {
DefaultInt32 = other.DefaultInt32;
@@ -4921,7 +4925,7 @@
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -4951,7 +4955,7 @@
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -4986,7 +4990,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint32_);
+ result.repeatedUint32_.Add(values);
return this;
}
public Builder ClearRepeatedUint32() {
@@ -5021,7 +5025,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -5051,7 +5055,7 @@
}
public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSint32_);
+ result.repeatedSint32_.Add(values);
return this;
}
public Builder ClearRepeatedSint32() {
@@ -5081,7 +5085,7 @@
}
public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSint64_);
+ result.repeatedSint64_.Add(values);
return this;
}
public Builder ClearRepeatedSint64() {
@@ -5116,7 +5120,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -5151,7 +5155,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -5181,7 +5185,7 @@
}
public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed32() {
@@ -5211,7 +5215,7 @@
}
public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed64() {
@@ -5241,7 +5245,7 @@
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -5271,7 +5275,7 @@
}
public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedDouble_);
+ result.repeatedDouble_.Add(values);
return this;
}
public Builder ClearRepeatedDouble() {
@@ -5301,7 +5305,7 @@
}
public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedBool_);
+ result.repeatedBool_.Add(values);
return this;
}
public Builder ClearRepeatedBool() {
@@ -5333,7 +5337,7 @@
}
public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedString_);
+ result.repeatedString_.Add(values);
return this;
}
public Builder ClearRepeatedString() {
@@ -5365,7 +5369,7 @@
}
public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedBytes_);
+ result.repeatedBytes_.Add(values);
return this;
}
public Builder ClearRepeatedBytes() {
@@ -5409,7 +5413,7 @@
}
public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.RepeatedGroup> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedGroup_);
+ result.repeatedGroup_.Add(values);
return this;
}
public Builder ClearRepeatedGroup() {
@@ -5453,7 +5457,7 @@
}
public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.NestedMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedNestedMessage() {
@@ -5497,7 +5501,7 @@
}
public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessageLite> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(values);
return this;
}
public Builder ClearRepeatedForeignMessage() {
@@ -5541,7 +5545,7 @@
}
public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessageLite> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(values);
return this;
}
public Builder ClearRepeatedImportMessage() {
@@ -5571,7 +5575,7 @@
}
public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.NestedEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(values);
return this;
}
public Builder ClearRepeatedNestedEnum() {
@@ -5601,7 +5605,7 @@
}
public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(values);
return this;
}
public Builder ClearRepeatedForeignEnum() {
@@ -5631,7 +5635,7 @@
}
public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnumLite> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(values);
return this;
}
public Builder ClearRepeatedImportEnum() {
@@ -5663,7 +5667,7 @@
}
public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(values);
return this;
}
public Builder ClearRepeatedStringPiece() {
@@ -5695,7 +5699,7 @@
}
public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedCord_);
+ result.repeatedCord_.Add(values);
return this;
}
public Builder ClearRepeatedCord() {
@@ -6125,6 +6129,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ForeignMessageLite : pb::GeneratedMessageLite<ForeignMessageLite, ForeignMessageLite.Builder> {
+ private ForeignMessageLite() { }
private static readonly ForeignMessageLite defaultInstance = new ForeignMessageLite().MakeReadOnly();
private static readonly string[] _foreignMessageLiteFieldNames = new string[] { "c" };
private static readonly uint[] _foreignMessageLiteFieldTags = new uint[] { 8 };
@@ -6389,6 +6394,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestPackedTypesLite : pb::GeneratedMessageLite<TestPackedTypesLite, TestPackedTypesLite.Builder> {
+ private TestPackedTypesLite() { }
private static readonly TestPackedTypesLite defaultInstance = new TestPackedTypesLite().MakeReadOnly();
private static readonly string[] _testPackedTypesLiteFieldNames = new string[] { "packed_bool", "packed_double", "packed_enum", "packed_fixed32", "packed_fixed64", "packed_float", "packed_int32", "packed_int64", "packed_sfixed32", "packed_sfixed64", "packed_sint32", "packed_sint64", "packed_uint32", "packed_uint64" };
private static readonly uint[] _testPackedTypesLiteFieldTags = new uint[] { 818, 810, 826, 770, 778, 802, 722, 730, 786, 794, 754, 762, 738, 746 };
@@ -7031,46 +7037,46 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypesLite.DefaultInstance) return this;
PrepareBuilder();
if (other.packedInt32_.Count != 0) {
- base.AddRange(other.packedInt32_, result.packedInt32_);
+ result.packedInt32_.Add(other.packedInt32_);
}
if (other.packedInt64_.Count != 0) {
- base.AddRange(other.packedInt64_, result.packedInt64_);
+ result.packedInt64_.Add(other.packedInt64_);
}
if (other.packedUint32_.Count != 0) {
- base.AddRange(other.packedUint32_, result.packedUint32_);
+ result.packedUint32_.Add(other.packedUint32_);
}
if (other.packedUint64_.Count != 0) {
- base.AddRange(other.packedUint64_, result.packedUint64_);
+ result.packedUint64_.Add(other.packedUint64_);
}
if (other.packedSint32_.Count != 0) {
- base.AddRange(other.packedSint32_, result.packedSint32_);
+ result.packedSint32_.Add(other.packedSint32_);
}
if (other.packedSint64_.Count != 0) {
- base.AddRange(other.packedSint64_, result.packedSint64_);
+ result.packedSint64_.Add(other.packedSint64_);
}
if (other.packedFixed32_.Count != 0) {
- base.AddRange(other.packedFixed32_, result.packedFixed32_);
+ result.packedFixed32_.Add(other.packedFixed32_);
}
if (other.packedFixed64_.Count != 0) {
- base.AddRange(other.packedFixed64_, result.packedFixed64_);
+ result.packedFixed64_.Add(other.packedFixed64_);
}
if (other.packedSfixed32_.Count != 0) {
- base.AddRange(other.packedSfixed32_, result.packedSfixed32_);
+ result.packedSfixed32_.Add(other.packedSfixed32_);
}
if (other.packedSfixed64_.Count != 0) {
- base.AddRange(other.packedSfixed64_, result.packedSfixed64_);
+ result.packedSfixed64_.Add(other.packedSfixed64_);
}
if (other.packedFloat_.Count != 0) {
- base.AddRange(other.packedFloat_, result.packedFloat_);
+ result.packedFloat_.Add(other.packedFloat_);
}
if (other.packedDouble_.Count != 0) {
- base.AddRange(other.packedDouble_, result.packedDouble_);
+ result.packedDouble_.Add(other.packedDouble_);
}
if (other.packedBool_.Count != 0) {
- base.AddRange(other.packedBool_, result.packedBool_);
+ result.packedBool_.Add(other.packedBool_);
}
if (other.packedEnum_.Count != 0) {
- base.AddRange(other.packedEnum_, result.packedEnum_);
+ result.packedEnum_.Add(other.packedEnum_);
}
return this;
}
@@ -7203,7 +7209,7 @@
}
public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedInt32_);
+ result.packedInt32_.Add(values);
return this;
}
public Builder ClearPackedInt32() {
@@ -7233,7 +7239,7 @@
}
public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedInt64_);
+ result.packedInt64_.Add(values);
return this;
}
public Builder ClearPackedInt64() {
@@ -7268,7 +7274,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.packedUint32_);
+ result.packedUint32_.Add(values);
return this;
}
public Builder ClearPackedUint32() {
@@ -7303,7 +7309,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.packedUint64_);
+ result.packedUint64_.Add(values);
return this;
}
public Builder ClearPackedUint64() {
@@ -7333,7 +7339,7 @@
}
public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSint32_);
+ result.packedSint32_.Add(values);
return this;
}
public Builder ClearPackedSint32() {
@@ -7363,7 +7369,7 @@
}
public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSint64_);
+ result.packedSint64_.Add(values);
return this;
}
public Builder ClearPackedSint64() {
@@ -7398,7 +7404,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFixed32_);
+ result.packedFixed32_.Add(values);
return this;
}
public Builder ClearPackedFixed32() {
@@ -7433,7 +7439,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFixed64_);
+ result.packedFixed64_.Add(values);
return this;
}
public Builder ClearPackedFixed64() {
@@ -7463,7 +7469,7 @@
}
public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSfixed32_);
+ result.packedSfixed32_.Add(values);
return this;
}
public Builder ClearPackedSfixed32() {
@@ -7493,7 +7499,7 @@
}
public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSfixed64_);
+ result.packedSfixed64_.Add(values);
return this;
}
public Builder ClearPackedSfixed64() {
@@ -7523,7 +7529,7 @@
}
public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFloat_);
+ result.packedFloat_.Add(values);
return this;
}
public Builder ClearPackedFloat() {
@@ -7553,7 +7559,7 @@
}
public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.packedDouble_);
+ result.packedDouble_.Add(values);
return this;
}
public Builder ClearPackedDouble() {
@@ -7583,7 +7589,7 @@
}
public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.packedBool_);
+ result.packedBool_.Add(values);
return this;
}
public Builder ClearPackedBool() {
@@ -7613,7 +7619,7 @@
}
public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite> values) {
PrepareBuilder();
- base.AddRange(values, result.packedEnum_);
+ result.packedEnum_.Add(values);
return this;
}
public Builder ClearPackedEnum() {
@@ -7631,6 +7637,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestUnpackedTypesLite : pb::GeneratedMessageLite<TestUnpackedTypesLite, TestUnpackedTypesLite.Builder> {
+ private TestUnpackedTypesLite() { }
private static readonly TestUnpackedTypesLite defaultInstance = new TestUnpackedTypesLite().MakeReadOnly();
private static readonly string[] _testUnpackedTypesLiteFieldNames = new string[] { "unpacked_bool", "unpacked_double", "unpacked_enum", "unpacked_fixed32", "unpacked_fixed64", "unpacked_float", "unpacked_int32", "unpacked_int64", "unpacked_sfixed32", "unpacked_sfixed64", "unpacked_sint32", "unpacked_sint64", "unpacked_uint32", "unpacked_uint64" };
private static readonly uint[] _testUnpackedTypesLiteFieldTags = new uint[] { 816, 809, 824, 773, 777, 805, 720, 728, 789, 793, 752, 760, 736, 744 };
@@ -8218,46 +8225,46 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypesLite.DefaultInstance) return this;
PrepareBuilder();
if (other.unpackedInt32_.Count != 0) {
- base.AddRange(other.unpackedInt32_, result.unpackedInt32_);
+ result.unpackedInt32_.Add(other.unpackedInt32_);
}
if (other.unpackedInt64_.Count != 0) {
- base.AddRange(other.unpackedInt64_, result.unpackedInt64_);
+ result.unpackedInt64_.Add(other.unpackedInt64_);
}
if (other.unpackedUint32_.Count != 0) {
- base.AddRange(other.unpackedUint32_, result.unpackedUint32_);
+ result.unpackedUint32_.Add(other.unpackedUint32_);
}
if (other.unpackedUint64_.Count != 0) {
- base.AddRange(other.unpackedUint64_, result.unpackedUint64_);
+ result.unpackedUint64_.Add(other.unpackedUint64_);
}
if (other.unpackedSint32_.Count != 0) {
- base.AddRange(other.unpackedSint32_, result.unpackedSint32_);
+ result.unpackedSint32_.Add(other.unpackedSint32_);
}
if (other.unpackedSint64_.Count != 0) {
- base.AddRange(other.unpackedSint64_, result.unpackedSint64_);
+ result.unpackedSint64_.Add(other.unpackedSint64_);
}
if (other.unpackedFixed32_.Count != 0) {
- base.AddRange(other.unpackedFixed32_, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(other.unpackedFixed32_);
}
if (other.unpackedFixed64_.Count != 0) {
- base.AddRange(other.unpackedFixed64_, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(other.unpackedFixed64_);
}
if (other.unpackedSfixed32_.Count != 0) {
- base.AddRange(other.unpackedSfixed32_, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
}
if (other.unpackedSfixed64_.Count != 0) {
- base.AddRange(other.unpackedSfixed64_, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
}
if (other.unpackedFloat_.Count != 0) {
- base.AddRange(other.unpackedFloat_, result.unpackedFloat_);
+ result.unpackedFloat_.Add(other.unpackedFloat_);
}
if (other.unpackedDouble_.Count != 0) {
- base.AddRange(other.unpackedDouble_, result.unpackedDouble_);
+ result.unpackedDouble_.Add(other.unpackedDouble_);
}
if (other.unpackedBool_.Count != 0) {
- base.AddRange(other.unpackedBool_, result.unpackedBool_);
+ result.unpackedBool_.Add(other.unpackedBool_);
}
if (other.unpackedEnum_.Count != 0) {
- base.AddRange(other.unpackedEnum_, result.unpackedEnum_);
+ result.unpackedEnum_.Add(other.unpackedEnum_);
}
return this;
}
@@ -8390,7 +8397,7 @@
}
public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedInt32_);
+ result.unpackedInt32_.Add(values);
return this;
}
public Builder ClearUnpackedInt32() {
@@ -8420,7 +8427,7 @@
}
public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedInt64_);
+ result.unpackedInt64_.Add(values);
return this;
}
public Builder ClearUnpackedInt64() {
@@ -8455,7 +8462,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedUint32_);
+ result.unpackedUint32_.Add(values);
return this;
}
public Builder ClearUnpackedUint32() {
@@ -8490,7 +8497,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedUint64_);
+ result.unpackedUint64_.Add(values);
return this;
}
public Builder ClearUnpackedUint64() {
@@ -8520,7 +8527,7 @@
}
public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSint32_);
+ result.unpackedSint32_.Add(values);
return this;
}
public Builder ClearUnpackedSint32() {
@@ -8550,7 +8557,7 @@
}
public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSint64_);
+ result.unpackedSint64_.Add(values);
return this;
}
public Builder ClearUnpackedSint64() {
@@ -8585,7 +8592,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(values);
return this;
}
public Builder ClearUnpackedFixed32() {
@@ -8620,7 +8627,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(values);
return this;
}
public Builder ClearUnpackedFixed64() {
@@ -8650,7 +8657,7 @@
}
public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed32() {
@@ -8680,7 +8687,7 @@
}
public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed64() {
@@ -8710,7 +8717,7 @@
}
public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFloat_);
+ result.unpackedFloat_.Add(values);
return this;
}
public Builder ClearUnpackedFloat() {
@@ -8740,7 +8747,7 @@
}
public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedDouble_);
+ result.unpackedDouble_.Add(values);
return this;
}
public Builder ClearUnpackedDouble() {
@@ -8770,7 +8777,7 @@
}
public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedBool_);
+ result.unpackedBool_.Add(values);
return this;
}
public Builder ClearUnpackedBool() {
@@ -8800,7 +8807,7 @@
}
public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedEnum_);
+ result.unpackedEnum_.Add(values);
return this;
}
public Builder ClearUnpackedEnum() {
@@ -8818,6 +8825,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestAllExtensionsLite : pb::ExtendableMessageLite<TestAllExtensionsLite, TestAllExtensionsLite.Builder> {
+ private TestAllExtensionsLite() { }
private static readonly TestAllExtensionsLite defaultInstance = new TestAllExtensionsLite().MakeReadOnly();
private static readonly string[] _testAllExtensionsLiteFieldNames = new string[] { };
private static readonly uint[] _testAllExtensionsLiteFieldTags = new uint[] { };
@@ -9044,6 +9052,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionalGroup_extension_lite : pb::GeneratedMessageLite<OptionalGroup_extension_lite, OptionalGroup_extension_lite.Builder> {
+ private OptionalGroup_extension_lite() { }
private static readonly OptionalGroup_extension_lite defaultInstance = new OptionalGroup_extension_lite().MakeReadOnly();
private static readonly string[] _optionalGroupExtensionLiteFieldNames = new string[] { "a" };
private static readonly uint[] _optionalGroupExtensionLiteFieldTags = new uint[] { 136 };
@@ -9308,6 +9317,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RepeatedGroup_extension_lite : pb::GeneratedMessageLite<RepeatedGroup_extension_lite, RepeatedGroup_extension_lite.Builder> {
+ private RepeatedGroup_extension_lite() { }
private static readonly RepeatedGroup_extension_lite defaultInstance = new RepeatedGroup_extension_lite().MakeReadOnly();
private static readonly string[] _repeatedGroupExtensionLiteFieldNames = new string[] { "a" };
private static readonly uint[] _repeatedGroupExtensionLiteFieldTags = new uint[] { 376 };
@@ -9572,6 +9582,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestPackedExtensionsLite : pb::ExtendableMessageLite<TestPackedExtensionsLite, TestPackedExtensionsLite.Builder> {
+ private TestPackedExtensionsLite() { }
private static readonly TestPackedExtensionsLite defaultInstance = new TestPackedExtensionsLite().MakeReadOnly();
private static readonly string[] _testPackedExtensionsLiteFieldNames = new string[] { };
private static readonly uint[] _testPackedExtensionsLiteFieldTags = new uint[] { };
@@ -9798,6 +9809,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestUnpackedExtensionsLite : pb::ExtendableMessageLite<TestUnpackedExtensionsLite, TestUnpackedExtensionsLite.Builder> {
+ private TestUnpackedExtensionsLite() { }
private static readonly TestUnpackedExtensionsLite defaultInstance = new TestUnpackedExtensionsLite().MakeReadOnly();
private static readonly string[] _testUnpackedExtensionsLiteFieldNames = new string[] { };
private static readonly uint[] _testUnpackedExtensionsLiteFieldTags = new uint[] { };
@@ -10024,6 +10036,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestNestedExtensionLite : pb::GeneratedMessageLite<TestNestedExtensionLite, TestNestedExtensionLite.Builder> {
+ private TestNestedExtensionLite() { }
private static readonly TestNestedExtensionLite defaultInstance = new TestNestedExtensionLite().MakeReadOnly();
private static readonly string[] _testNestedExtensionLiteFieldNames = new string[] { };
private static readonly uint[] _testNestedExtensionLiteFieldTags = new uint[] { };
@@ -10244,6 +10257,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDeprecatedLite : pb::GeneratedMessageLite<TestDeprecatedLite, TestDeprecatedLite.Builder> {
+ private TestDeprecatedLite() { }
private static readonly TestDeprecatedLite defaultInstance = new TestDeprecatedLite().MakeReadOnly();
private static readonly string[] _testDeprecatedLiteFieldNames = new string[] { "deprecated_field" };
private static readonly uint[] _testDeprecatedLiteFieldTags = new uint[] { 8 };
@@ -10262,9 +10276,11 @@
public const int DeprecatedFieldFieldNumber = 1;
private bool hasDeprecatedField;
private int deprecatedField_;
+ [global::System.ObsoleteAttribute()]
public bool HasDeprecatedField {
get { return hasDeprecatedField; }
}
+ [global::System.ObsoleteAttribute()]
public int DeprecatedField {
get { return deprecatedField_; }
}
@@ -10479,19 +10495,23 @@
}
+ [global::System.ObsoleteAttribute()]
public bool HasDeprecatedField {
get { return result.hasDeprecatedField; }
}
+ [global::System.ObsoleteAttribute()]
public int DeprecatedField {
get { return result.DeprecatedField; }
set { SetDeprecatedField(value); }
}
+ [global::System.ObsoleteAttribute()]
public Builder SetDeprecatedField(int value) {
PrepareBuilder();
result.hasDeprecatedField = true;
result.deprecatedField_ = value;
return this;
}
+ [global::System.ObsoleteAttribute()]
public Builder ClearDeprecatedField() {
PrepareBuilder();
result.hasDeprecatedField = false;
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs
index 0c66d4b..3506495 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -1122,6 +1122,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestAllTypes : pb::GeneratedMessage<TestAllTypes, TestAllTypes.Builder> {
+ private TestAllTypes() { }
private static readonly TestAllTypes defaultInstance = new TestAllTypes().MakeReadOnly();
private static readonly string[] _testAllTypesFieldNames = new string[] { "default_bool", "default_bytes", "default_cord", "default_double", "default_fixed32", "default_fixed64", "default_float", "default_foreign_enum", "default_import_enum", "default_int32", "default_int64", "default_nested_enum", "default_sfixed32", "default_sfixed64", "default_sint32", "default_sint64", "default_string", "default_string_piece", "default_uint32", "default_uint64", "optional_bool", "optional_bytes", "optional_cord", "optional_double", "optional_fixed32", "optional_fixed64", "optional_float", "optional_foreign_enum", "optional_foreign_message", "optional_import_enum", "optional_import_message", "optional_int32", "optional_int64", "optional_nested_enum", "optional_nested_message", "optional_sfixed32", "optional_sfixed64", "optional_sint32", "optional_sint64", "optional_string", "optional_string_piece", "optional_uint32", "optional_uint64", "optionalgroup", "repeated_bool", "repeated_bytes", "repeated_cord", "repeated_double", "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_foreign_enum", "repeated_foreign_message", "repeated_import_enum", "repeated_import_message", "repeated_int32", "repeated_int64", "repeated_nested_enum", "repeated_nested_message", "repeated_sfixed32", "repeated_sfixed64", "repeated_sint32", "repeated_sint64", "repeated_string", "repeated_string_piece", "repeated_uint32", "repeated_uint64", "repeatedgroup" };
private static readonly uint[] _testAllTypesFieldTags = new uint[] { 584, 602, 682, 577, 541, 545, 573, 656, 664, 488, 496, 648, 557, 561, 520, 528, 594, 674, 504, 512, 104, 122, 202, 97, 61, 65, 93, 176, 154, 184, 162, 8, 16, 168, 146, 77, 81, 40, 48, 114, 194, 24, 32, 131, 344, 362, 442, 337, 301, 305, 333, 416, 394, 424, 402, 248, 256, 408, 386, 317, 321, 280, 288, 354, 434, 264, 272, 371 };
@@ -1162,6 +1163,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
private static readonly string[] _nestedMessageFieldNames = new string[] { "bb" };
private static readonly uint[] _nestedMessageFieldTags = new uint[] { 8 };
@@ -1435,6 +1437,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionalGroup : pb::GeneratedMessage<OptionalGroup, OptionalGroup.Builder> {
+ private OptionalGroup() { }
private static readonly OptionalGroup defaultInstance = new OptionalGroup().MakeReadOnly();
private static readonly string[] _optionalGroupFieldNames = new string[] { "a" };
private static readonly uint[] _optionalGroupFieldTags = new uint[] { 136 };
@@ -1708,6 +1711,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RepeatedGroup : pb::GeneratedMessage<RepeatedGroup, RepeatedGroup.Builder> {
+ private RepeatedGroup() { }
private static readonly RepeatedGroup defaultInstance = new RepeatedGroup().MakeReadOnly();
private static readonly string[] _repeatedGroupFieldNames = new string[] { "a" };
private static readonly uint[] _repeatedGroupFieldTags = new uint[] { 376 };
@@ -3466,76 +3470,76 @@
OptionalCord = other.OptionalCord;
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedUint32_.Count != 0) {
- base.AddRange(other.repeatedUint32_, result.repeatedUint32_);
+ result.repeatedUint32_.Add(other.repeatedUint32_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
if (other.repeatedSint32_.Count != 0) {
- base.AddRange(other.repeatedSint32_, result.repeatedSint32_);
+ result.repeatedSint32_.Add(other.repeatedSint32_);
}
if (other.repeatedSint64_.Count != 0) {
- base.AddRange(other.repeatedSint64_, result.repeatedSint64_);
+ result.repeatedSint64_.Add(other.repeatedSint64_);
}
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedSfixed32_.Count != 0) {
- base.AddRange(other.repeatedSfixed32_, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
}
if (other.repeatedSfixed64_.Count != 0) {
- base.AddRange(other.repeatedSfixed64_, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedDouble_.Count != 0) {
- base.AddRange(other.repeatedDouble_, result.repeatedDouble_);
+ result.repeatedDouble_.Add(other.repeatedDouble_);
}
if (other.repeatedBool_.Count != 0) {
- base.AddRange(other.repeatedBool_, result.repeatedBool_);
+ result.repeatedBool_.Add(other.repeatedBool_);
}
if (other.repeatedString_.Count != 0) {
- base.AddRange(other.repeatedString_, result.repeatedString_);
+ result.repeatedString_.Add(other.repeatedString_);
}
if (other.repeatedBytes_.Count != 0) {
- base.AddRange(other.repeatedBytes_, result.repeatedBytes_);
+ result.repeatedBytes_.Add(other.repeatedBytes_);
}
if (other.repeatedGroup_.Count != 0) {
- base.AddRange(other.repeatedGroup_, result.repeatedGroup_);
+ result.repeatedGroup_.Add(other.repeatedGroup_);
}
if (other.repeatedNestedMessage_.Count != 0) {
- base.AddRange(other.repeatedNestedMessage_, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
}
if (other.repeatedForeignMessage_.Count != 0) {
- base.AddRange(other.repeatedForeignMessage_, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
}
if (other.repeatedImportMessage_.Count != 0) {
- base.AddRange(other.repeatedImportMessage_, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
}
if (other.repeatedNestedEnum_.Count != 0) {
- base.AddRange(other.repeatedNestedEnum_, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
}
if (other.repeatedForeignEnum_.Count != 0) {
- base.AddRange(other.repeatedForeignEnum_, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
}
if (other.repeatedImportEnum_.Count != 0) {
- base.AddRange(other.repeatedImportEnum_, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
}
if (other.repeatedStringPiece_.Count != 0) {
- base.AddRange(other.repeatedStringPiece_, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
}
if (other.repeatedCord_.Count != 0) {
- base.AddRange(other.repeatedCord_, result.repeatedCord_);
+ result.repeatedCord_.Add(other.repeatedCord_);
}
if (other.HasDefaultInt32) {
DefaultInt32 = other.DefaultInt32;
@@ -4626,7 +4630,7 @@
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -4656,7 +4660,7 @@
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -4691,7 +4695,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint32_);
+ result.repeatedUint32_.Add(values);
return this;
}
public Builder ClearRepeatedUint32() {
@@ -4726,7 +4730,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -4756,7 +4760,7 @@
}
public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSint32_);
+ result.repeatedSint32_.Add(values);
return this;
}
public Builder ClearRepeatedSint32() {
@@ -4786,7 +4790,7 @@
}
public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSint64_);
+ result.repeatedSint64_.Add(values);
return this;
}
public Builder ClearRepeatedSint64() {
@@ -4821,7 +4825,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -4856,7 +4860,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -4886,7 +4890,7 @@
}
public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed32() {
@@ -4916,7 +4920,7 @@
}
public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed64() {
@@ -4946,7 +4950,7 @@
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -4976,7 +4980,7 @@
}
public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedDouble_);
+ result.repeatedDouble_.Add(values);
return this;
}
public Builder ClearRepeatedDouble() {
@@ -5006,7 +5010,7 @@
}
public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedBool_);
+ result.repeatedBool_.Add(values);
return this;
}
public Builder ClearRepeatedBool() {
@@ -5038,7 +5042,7 @@
}
public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedString_);
+ result.repeatedString_.Add(values);
return this;
}
public Builder ClearRepeatedString() {
@@ -5070,7 +5074,7 @@
}
public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedBytes_);
+ result.repeatedBytes_.Add(values);
return this;
}
public Builder ClearRepeatedBytes() {
@@ -5114,7 +5118,7 @@
}
public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedGroup_);
+ result.repeatedGroup_.Add(values);
return this;
}
public Builder ClearRepeatedGroup() {
@@ -5158,7 +5162,7 @@
}
public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedNestedMessage() {
@@ -5202,7 +5206,7 @@
}
public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(values);
return this;
}
public Builder ClearRepeatedForeignMessage() {
@@ -5246,7 +5250,7 @@
}
public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(values);
return this;
}
public Builder ClearRepeatedImportMessage() {
@@ -5276,7 +5280,7 @@
}
public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(values);
return this;
}
public Builder ClearRepeatedNestedEnum() {
@@ -5306,7 +5310,7 @@
}
public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(values);
return this;
}
public Builder ClearRepeatedForeignEnum() {
@@ -5336,7 +5340,7 @@
}
public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(values);
return this;
}
public Builder ClearRepeatedImportEnum() {
@@ -5368,7 +5372,7 @@
}
public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(values);
return this;
}
public Builder ClearRepeatedStringPiece() {
@@ -5400,7 +5404,7 @@
}
public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedCord_);
+ result.repeatedCord_.Add(values);
return this;
}
public Builder ClearRepeatedCord() {
@@ -5830,6 +5834,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDeprecatedFields : pb::GeneratedMessage<TestDeprecatedFields, TestDeprecatedFields.Builder> {
+ private TestDeprecatedFields() { }
private static readonly TestDeprecatedFields defaultInstance = new TestDeprecatedFields().MakeReadOnly();
private static readonly string[] _testDeprecatedFieldsFieldNames = new string[] { "deprecated_int32" };
private static readonly uint[] _testDeprecatedFieldsFieldTags = new uint[] { 8 };
@@ -5856,9 +5861,11 @@
public const int DeprecatedInt32FieldNumber = 1;
private bool hasDeprecatedInt32;
private int deprecatedInt32_;
+ [global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return hasDeprecatedInt32; }
}
+ [global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return deprecatedInt32_; }
}
@@ -6074,19 +6081,23 @@
}
+ [global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return result.hasDeprecatedInt32; }
}
+ [global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return result.DeprecatedInt32; }
set { SetDeprecatedInt32(value); }
}
+ [global::System.ObsoleteAttribute()]
public Builder SetDeprecatedInt32(int value) {
PrepareBuilder();
result.hasDeprecatedInt32 = true;
result.deprecatedInt32_ = value;
return this;
}
+ [global::System.ObsoleteAttribute()]
public Builder ClearDeprecatedInt32() {
PrepareBuilder();
result.hasDeprecatedInt32 = false;
@@ -6103,6 +6114,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ForeignMessage : pb::GeneratedMessage<ForeignMessage, ForeignMessage.Builder> {
+ private ForeignMessage() { }
private static readonly ForeignMessage defaultInstance = new ForeignMessage().MakeReadOnly();
private static readonly string[] _foreignMessageFieldNames = new string[] { "c" };
private static readonly uint[] _foreignMessageFieldTags = new uint[] { 8 };
@@ -6376,6 +6388,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestAllExtensions : pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.Builder> {
+ private TestAllExtensions() { }
private static readonly TestAllExtensions defaultInstance = new TestAllExtensions().MakeReadOnly();
private static readonly string[] _testAllExtensionsFieldNames = new string[] { };
private static readonly uint[] _testAllExtensionsFieldTags = new uint[] { };
@@ -6611,6 +6624,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionalGroup_extension : pb::GeneratedMessage<OptionalGroup_extension, OptionalGroup_extension.Builder> {
+ private OptionalGroup_extension() { }
private static readonly OptionalGroup_extension defaultInstance = new OptionalGroup_extension().MakeReadOnly();
private static readonly string[] _optionalGroupExtensionFieldNames = new string[] { "a" };
private static readonly uint[] _optionalGroupExtensionFieldTags = new uint[] { 136 };
@@ -6884,6 +6898,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class RepeatedGroup_extension : pb::GeneratedMessage<RepeatedGroup_extension, RepeatedGroup_extension.Builder> {
+ private RepeatedGroup_extension() { }
private static readonly RepeatedGroup_extension defaultInstance = new RepeatedGroup_extension().MakeReadOnly();
private static readonly string[] _repeatedGroupExtensionFieldNames = new string[] { "a" };
private static readonly uint[] _repeatedGroupExtensionFieldTags = new uint[] { 376 };
@@ -7157,6 +7172,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestNestedExtension : pb::GeneratedMessage<TestNestedExtension, TestNestedExtension.Builder> {
+ private TestNestedExtension() { }
private static readonly TestNestedExtension defaultInstance = new TestNestedExtension().MakeReadOnly();
private static readonly string[] _testNestedExtensionFieldNames = new string[] { };
private static readonly uint[] _testNestedExtensionFieldTags = new uint[] { };
@@ -7389,6 +7405,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRequired : pb::GeneratedMessage<TestRequired, TestRequired.Builder> {
+ private TestRequired() { }
private static readonly TestRequired defaultInstance = new TestRequired().MakeReadOnly();
private static readonly string[] _testRequiredFieldNames = new string[] { "a", "b", "c", "dummy10", "dummy11", "dummy12", "dummy13", "dummy14", "dummy15", "dummy16", "dummy17", "dummy18", "dummy19", "dummy2", "dummy20", "dummy21", "dummy22", "dummy23", "dummy24", "dummy25", "dummy26", "dummy27", "dummy28", "dummy29", "dummy30", "dummy31", "dummy32", "dummy4", "dummy5", "dummy6", "dummy7", "dummy8", "dummy9" };
private static readonly uint[] _testRequiredFieldTags = new uint[] { 8, 24, 264, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 16, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 32, 40, 48, 56, 64, 72 };
@@ -9045,6 +9062,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRequiredForeign : pb::GeneratedMessage<TestRequiredForeign, TestRequiredForeign.Builder> {
+ private TestRequiredForeign() { }
private static readonly TestRequiredForeign defaultInstance = new TestRequiredForeign().MakeReadOnly();
private static readonly string[] _testRequiredForeignFieldNames = new string[] { "dummy", "optional_message", "repeated_message" };
private static readonly uint[] _testRequiredForeignFieldTags = new uint[] { 24, 10, 18 };
@@ -9274,7 +9292,7 @@
MergeOptionalMessage(other.OptionalMessage);
}
if (other.repeatedMessage_.Count != 0) {
- base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
+ result.repeatedMessage_.Add(other.repeatedMessage_);
}
if (other.HasDummy) {
Dummy = other.Dummy;
@@ -9424,7 +9442,7 @@
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestRequired> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedMessage_);
+ result.repeatedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedMessage() {
@@ -9462,6 +9480,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestForeignNested : pb::GeneratedMessage<TestForeignNested, TestForeignNested.Builder> {
+ private TestForeignNested() { }
private static readonly TestForeignNested defaultInstance = new TestForeignNested().MakeReadOnly();
private static readonly string[] _testForeignNestedFieldNames = new string[] { "foreign_nested" };
private static readonly uint[] _testForeignNestedFieldTags = new uint[] { 10 };
@@ -9760,6 +9779,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestEmptyMessage : pb::GeneratedMessage<TestEmptyMessage, TestEmptyMessage.Builder> {
+ private TestEmptyMessage() { }
private static readonly TestEmptyMessage defaultInstance = new TestEmptyMessage().MakeReadOnly();
private static readonly string[] _testEmptyMessageFieldNames = new string[] { };
private static readonly uint[] _testEmptyMessageFieldTags = new uint[] { };
@@ -9990,6 +10010,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestEmptyMessageWithExtensions : pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder> {
+ private TestEmptyMessageWithExtensions() { }
private static readonly TestEmptyMessageWithExtensions defaultInstance = new TestEmptyMessageWithExtensions().MakeReadOnly();
private static readonly string[] _testEmptyMessageWithExtensionsFieldNames = new string[] { };
private static readonly uint[] _testEmptyMessageWithExtensionsFieldTags = new uint[] { };
@@ -10225,6 +10246,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMultipleExtensionRanges : pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder> {
+ private TestMultipleExtensionRanges() { }
private static readonly TestMultipleExtensionRanges defaultInstance = new TestMultipleExtensionRanges().MakeReadOnly();
private static readonly string[] _testMultipleExtensionRangesFieldNames = new string[] { };
private static readonly uint[] _testMultipleExtensionRangesFieldTags = new uint[] { };
@@ -10462,6 +10484,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestReallyLargeTagNumber : pb::GeneratedMessage<TestReallyLargeTagNumber, TestReallyLargeTagNumber.Builder> {
+ private TestReallyLargeTagNumber() { }
private static readonly TestReallyLargeTagNumber defaultInstance = new TestReallyLargeTagNumber().MakeReadOnly();
private static readonly string[] _testReallyLargeTagNumberFieldNames = new string[] { "a", "bb" };
private static readonly uint[] _testReallyLargeTagNumberFieldTags = new uint[] { 8, 2147483640 };
@@ -10778,6 +10801,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRecursiveMessage : pb::GeneratedMessage<TestRecursiveMessage, TestRecursiveMessage.Builder> {
+ private TestRecursiveMessage() { }
private static readonly TestRecursiveMessage defaultInstance = new TestRecursiveMessage().MakeReadOnly();
private static readonly string[] _testRecursiveMessageFieldNames = new string[] { "a", "i" };
private static readonly uint[] _testRecursiveMessageFieldTags = new uint[] { 10, 16 };
@@ -11119,6 +11143,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMutualRecursionA : pb::GeneratedMessage<TestMutualRecursionA, TestMutualRecursionA.Builder> {
+ private TestMutualRecursionA() { }
private static readonly TestMutualRecursionA defaultInstance = new TestMutualRecursionA().MakeReadOnly();
private static readonly string[] _testMutualRecursionAFieldNames = new string[] { "bb" };
private static readonly uint[] _testMutualRecursionAFieldTags = new uint[] { 10 };
@@ -11417,6 +11442,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMutualRecursionB : pb::GeneratedMessage<TestMutualRecursionB, TestMutualRecursionB.Builder> {
+ private TestMutualRecursionB() { }
private static readonly TestMutualRecursionB defaultInstance = new TestMutualRecursionB().MakeReadOnly();
private static readonly string[] _testMutualRecursionBFieldNames = new string[] { "a", "optional_int32" };
private static readonly uint[] _testMutualRecursionBFieldTags = new uint[] { 10, 16 };
@@ -11758,6 +11784,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDupFieldNumber : pb::GeneratedMessage<TestDupFieldNumber, TestDupFieldNumber.Builder> {
+ private TestDupFieldNumber() { }
private static readonly TestDupFieldNumber defaultInstance = new TestDupFieldNumber().MakeReadOnly();
private static readonly string[] _testDupFieldNumberFieldNames = new string[] { "a", "bar", "foo" };
private static readonly uint[] _testDupFieldNumberFieldTags = new uint[] { 8, 27, 19 };
@@ -11790,6 +11817,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Foo : pb::GeneratedMessage<Foo, Foo.Builder> {
+ private Foo() { }
private static readonly Foo defaultInstance = new Foo().MakeReadOnly();
private static readonly string[] _fooFieldNames = new string[] { "a" };
private static readonly uint[] _fooFieldTags = new uint[] { 8 };
@@ -12063,6 +12091,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Bar : pb::GeneratedMessage<Bar, Bar.Builder> {
+ private Bar() { }
private static readonly Bar defaultInstance = new Bar().MakeReadOnly();
private static readonly string[] _barFieldNames = new string[] { "a" };
private static readonly uint[] _barFieldTags = new uint[] { 8 };
@@ -12721,6 +12750,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestNestedMessageHasBits : pb::GeneratedMessage<TestNestedMessageHasBits, TestNestedMessageHasBits.Builder> {
+ private TestNestedMessageHasBits() { }
private static readonly TestNestedMessageHasBits defaultInstance = new TestNestedMessageHasBits().MakeReadOnly();
private static readonly string[] _testNestedMessageHasBitsFieldNames = new string[] { "optional_nested_message" };
private static readonly uint[] _testNestedMessageHasBitsFieldTags = new uint[] { 10 };
@@ -12753,6 +12783,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
private static readonly string[] _nestedMessageFieldNames = new string[] { "nestedmessage_repeated_foreignmessage", "nestedmessage_repeated_int32" };
private static readonly uint[] _nestedMessageFieldTags = new uint[] { 18, 8 };
@@ -12965,10 +12996,10 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) return this;
PrepareBuilder();
if (other.nestedmessageRepeatedInt32_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedInt32_, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
}
if (other.nestedmessageRepeatedForeignmessage_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedForeignmessage_, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -13053,7 +13084,7 @@
}
public Builder AddRangeNestedmessageRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedInt32() {
@@ -13097,7 +13128,7 @@
}
public Builder AddRangeNestedmessageRepeatedForeignmessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedForeignmessage() {
@@ -13389,6 +13420,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestCamelCaseFieldNames : pb::GeneratedMessage<TestCamelCaseFieldNames, TestCamelCaseFieldNames.Builder> {
+ private TestCamelCaseFieldNames() { }
private static readonly TestCamelCaseFieldNames defaultInstance = new TestCamelCaseFieldNames().MakeReadOnly();
private static readonly string[] _testCamelCaseFieldNamesFieldNames = new string[] { "CordField", "EnumField", "MessageField", "PrimitiveField", "RepeatedCordField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedStringPieceField", "StringField", "StringPieceField" };
private static readonly uint[] _testCamelCaseFieldNamesFieldTags = new uint[] { 50, 24, 34, 8, 98, 72, 82, 56, 66, 90, 18, 42 };
@@ -13813,22 +13845,22 @@
CordField = other.CordField;
}
if (other.repeatedPrimitiveField_.Count != 0) {
- base.AddRange(other.repeatedPrimitiveField_, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
}
if (other.repeatedStringField_.Count != 0) {
- base.AddRange(other.repeatedStringField_, result.repeatedStringField_);
+ result.repeatedStringField_.Add(other.repeatedStringField_);
}
if (other.repeatedEnumField_.Count != 0) {
- base.AddRange(other.repeatedEnumField_, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(other.repeatedEnumField_);
}
if (other.repeatedMessageField_.Count != 0) {
- base.AddRange(other.repeatedMessageField_, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(other.repeatedMessageField_);
}
if (other.repeatedStringPieceField_.Count != 0) {
- base.AddRange(other.repeatedStringPieceField_, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
}
if (other.repeatedCordField_.Count != 0) {
- base.AddRange(other.repeatedCordField_, result.repeatedCordField_);
+ result.repeatedCordField_.Add(other.repeatedCordField_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -14119,7 +14151,7 @@
}
public Builder AddRangeRepeatedPrimitiveField(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(values);
return this;
}
public Builder ClearRepeatedPrimitiveField() {
@@ -14151,7 +14183,7 @@
}
public Builder AddRangeRepeatedStringField(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringField_);
+ result.repeatedStringField_.Add(values);
return this;
}
public Builder ClearRepeatedStringField() {
@@ -14181,7 +14213,7 @@
}
public Builder AddRangeRepeatedEnumField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(values);
return this;
}
public Builder ClearRepeatedEnumField() {
@@ -14225,7 +14257,7 @@
}
public Builder AddRangeRepeatedMessageField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(values);
return this;
}
public Builder ClearRepeatedMessageField() {
@@ -14257,7 +14289,7 @@
}
public Builder AddRangeRepeatedStringPieceField(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(values);
return this;
}
public Builder ClearRepeatedStringPieceField() {
@@ -14289,7 +14321,7 @@
}
public Builder AddRangeRepeatedCordField(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedCordField_);
+ result.repeatedCordField_.Add(values);
return this;
}
public Builder ClearRepeatedCordField() {
@@ -14307,6 +14339,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestFieldOrderings : pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder> {
+ private TestFieldOrderings() { }
private static readonly TestFieldOrderings defaultInstance = new TestFieldOrderings().MakeReadOnly();
private static readonly string[] _testFieldOrderingsFieldNames = new string[] { "my_float", "my_int", "my_string" };
private static readonly uint[] _testFieldOrderingsFieldTags = new uint[] { 813, 8, 90 };
@@ -14673,6 +14706,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestExtremeDefaultValues : pb::GeneratedMessage<TestExtremeDefaultValues, TestExtremeDefaultValues.Builder> {
+ private TestExtremeDefaultValues() { }
private static readonly TestExtremeDefaultValues defaultInstance = new TestExtremeDefaultValues().MakeReadOnly();
private static readonly string[] _testExtremeDefaultValuesFieldNames = new string[] { "escaped_bytes", "inf_double", "inf_float", "large_float", "large_uint32", "large_uint64", "nan_double", "nan_float", "neg_inf_double", "neg_inf_float", "negative_float", "negative_one_float", "one_float", "small_float", "small_int32", "small_int64", "small_negative_float", "utf8_string", "zero_float" };
private static readonly uint[] _testExtremeDefaultValuesFieldTags = new uint[] { 10, 113, 141, 101, 16, 24, 129, 157, 121, 149, 93, 85, 69, 77, 32, 40, 109, 50, 61 };
@@ -15728,6 +15762,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OneString : pb::GeneratedMessage<OneString, OneString.Builder> {
+ private OneString() { }
private static readonly OneString defaultInstance = new OneString().MakeReadOnly();
private static readonly string[] _oneStringFieldNames = new string[] { "data" };
private static readonly uint[] _oneStringFieldTags = new uint[] { 10 };
@@ -16002,6 +16037,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OneBytes : pb::GeneratedMessage<OneBytes, OneBytes.Builder> {
+ private OneBytes() { }
private static readonly OneBytes defaultInstance = new OneBytes().MakeReadOnly();
private static readonly string[] _oneBytesFieldNames = new string[] { "data" };
private static readonly uint[] _oneBytesFieldTags = new uint[] { 10 };
@@ -16276,6 +16312,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestPackedTypes : pb::GeneratedMessage<TestPackedTypes, TestPackedTypes.Builder> {
+ private TestPackedTypes() { }
private static readonly TestPackedTypes defaultInstance = new TestPackedTypes().MakeReadOnly();
private static readonly string[] _testPackedTypesFieldNames = new string[] { "packed_bool", "packed_double", "packed_enum", "packed_fixed32", "packed_fixed64", "packed_float", "packed_int32", "packed_int64", "packed_sfixed32", "packed_sfixed64", "packed_sint32", "packed_sint64", "packed_uint32", "packed_uint64" };
private static readonly uint[] _testPackedTypesFieldTags = new uint[] { 818, 810, 826, 770, 778, 802, 722, 730, 786, 794, 754, 762, 738, 746 };
@@ -16832,46 +16869,46 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance) return this;
PrepareBuilder();
if (other.packedInt32_.Count != 0) {
- base.AddRange(other.packedInt32_, result.packedInt32_);
+ result.packedInt32_.Add(other.packedInt32_);
}
if (other.packedInt64_.Count != 0) {
- base.AddRange(other.packedInt64_, result.packedInt64_);
+ result.packedInt64_.Add(other.packedInt64_);
}
if (other.packedUint32_.Count != 0) {
- base.AddRange(other.packedUint32_, result.packedUint32_);
+ result.packedUint32_.Add(other.packedUint32_);
}
if (other.packedUint64_.Count != 0) {
- base.AddRange(other.packedUint64_, result.packedUint64_);
+ result.packedUint64_.Add(other.packedUint64_);
}
if (other.packedSint32_.Count != 0) {
- base.AddRange(other.packedSint32_, result.packedSint32_);
+ result.packedSint32_.Add(other.packedSint32_);
}
if (other.packedSint64_.Count != 0) {
- base.AddRange(other.packedSint64_, result.packedSint64_);
+ result.packedSint64_.Add(other.packedSint64_);
}
if (other.packedFixed32_.Count != 0) {
- base.AddRange(other.packedFixed32_, result.packedFixed32_);
+ result.packedFixed32_.Add(other.packedFixed32_);
}
if (other.packedFixed64_.Count != 0) {
- base.AddRange(other.packedFixed64_, result.packedFixed64_);
+ result.packedFixed64_.Add(other.packedFixed64_);
}
if (other.packedSfixed32_.Count != 0) {
- base.AddRange(other.packedSfixed32_, result.packedSfixed32_);
+ result.packedSfixed32_.Add(other.packedSfixed32_);
}
if (other.packedSfixed64_.Count != 0) {
- base.AddRange(other.packedSfixed64_, result.packedSfixed64_);
+ result.packedSfixed64_.Add(other.packedSfixed64_);
}
if (other.packedFloat_.Count != 0) {
- base.AddRange(other.packedFloat_, result.packedFloat_);
+ result.packedFloat_.Add(other.packedFloat_);
}
if (other.packedDouble_.Count != 0) {
- base.AddRange(other.packedDouble_, result.packedDouble_);
+ result.packedDouble_.Add(other.packedDouble_);
}
if (other.packedBool_.Count != 0) {
- base.AddRange(other.packedBool_, result.packedBool_);
+ result.packedBool_.Add(other.packedBool_);
}
if (other.packedEnum_.Count != 0) {
- base.AddRange(other.packedEnum_, result.packedEnum_);
+ result.packedEnum_.Add(other.packedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -17026,7 +17063,7 @@
}
public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedInt32_);
+ result.packedInt32_.Add(values);
return this;
}
public Builder ClearPackedInt32() {
@@ -17056,7 +17093,7 @@
}
public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedInt64_);
+ result.packedInt64_.Add(values);
return this;
}
public Builder ClearPackedInt64() {
@@ -17091,7 +17128,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.packedUint32_);
+ result.packedUint32_.Add(values);
return this;
}
public Builder ClearPackedUint32() {
@@ -17126,7 +17163,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.packedUint64_);
+ result.packedUint64_.Add(values);
return this;
}
public Builder ClearPackedUint64() {
@@ -17156,7 +17193,7 @@
}
public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSint32_);
+ result.packedSint32_.Add(values);
return this;
}
public Builder ClearPackedSint32() {
@@ -17186,7 +17223,7 @@
}
public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSint64_);
+ result.packedSint64_.Add(values);
return this;
}
public Builder ClearPackedSint64() {
@@ -17221,7 +17258,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFixed32_);
+ result.packedFixed32_.Add(values);
return this;
}
public Builder ClearPackedFixed32() {
@@ -17256,7 +17293,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFixed64_);
+ result.packedFixed64_.Add(values);
return this;
}
public Builder ClearPackedFixed64() {
@@ -17286,7 +17323,7 @@
}
public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSfixed32_);
+ result.packedSfixed32_.Add(values);
return this;
}
public Builder ClearPackedSfixed32() {
@@ -17316,7 +17353,7 @@
}
public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.packedSfixed64_);
+ result.packedSfixed64_.Add(values);
return this;
}
public Builder ClearPackedSfixed64() {
@@ -17346,7 +17383,7 @@
}
public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.packedFloat_);
+ result.packedFloat_.Add(values);
return this;
}
public Builder ClearPackedFloat() {
@@ -17376,7 +17413,7 @@
}
public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.packedDouble_);
+ result.packedDouble_.Add(values);
return this;
}
public Builder ClearPackedDouble() {
@@ -17406,7 +17443,7 @@
}
public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.packedBool_);
+ result.packedBool_.Add(values);
return this;
}
public Builder ClearPackedBool() {
@@ -17436,7 +17473,7 @@
}
public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.packedEnum_);
+ result.packedEnum_.Add(values);
return this;
}
public Builder ClearPackedEnum() {
@@ -17454,6 +17491,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestUnpackedTypes : pb::GeneratedMessage<TestUnpackedTypes, TestUnpackedTypes.Builder> {
+ private TestUnpackedTypes() { }
private static readonly TestUnpackedTypes defaultInstance = new TestUnpackedTypes().MakeReadOnly();
private static readonly string[] _testUnpackedTypesFieldNames = new string[] { "unpacked_bool", "unpacked_double", "unpacked_enum", "unpacked_fixed32", "unpacked_fixed64", "unpacked_float", "unpacked_int32", "unpacked_int64", "unpacked_sfixed32", "unpacked_sfixed64", "unpacked_sint32", "unpacked_sint64", "unpacked_uint32", "unpacked_uint64" };
private static readonly uint[] _testUnpackedTypesFieldTags = new uint[] { 816, 809, 824, 773, 777, 805, 720, 728, 789, 793, 752, 760, 736, 744 };
@@ -17955,46 +17993,46 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.DefaultInstance) return this;
PrepareBuilder();
if (other.unpackedInt32_.Count != 0) {
- base.AddRange(other.unpackedInt32_, result.unpackedInt32_);
+ result.unpackedInt32_.Add(other.unpackedInt32_);
}
if (other.unpackedInt64_.Count != 0) {
- base.AddRange(other.unpackedInt64_, result.unpackedInt64_);
+ result.unpackedInt64_.Add(other.unpackedInt64_);
}
if (other.unpackedUint32_.Count != 0) {
- base.AddRange(other.unpackedUint32_, result.unpackedUint32_);
+ result.unpackedUint32_.Add(other.unpackedUint32_);
}
if (other.unpackedUint64_.Count != 0) {
- base.AddRange(other.unpackedUint64_, result.unpackedUint64_);
+ result.unpackedUint64_.Add(other.unpackedUint64_);
}
if (other.unpackedSint32_.Count != 0) {
- base.AddRange(other.unpackedSint32_, result.unpackedSint32_);
+ result.unpackedSint32_.Add(other.unpackedSint32_);
}
if (other.unpackedSint64_.Count != 0) {
- base.AddRange(other.unpackedSint64_, result.unpackedSint64_);
+ result.unpackedSint64_.Add(other.unpackedSint64_);
}
if (other.unpackedFixed32_.Count != 0) {
- base.AddRange(other.unpackedFixed32_, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(other.unpackedFixed32_);
}
if (other.unpackedFixed64_.Count != 0) {
- base.AddRange(other.unpackedFixed64_, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(other.unpackedFixed64_);
}
if (other.unpackedSfixed32_.Count != 0) {
- base.AddRange(other.unpackedSfixed32_, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
}
if (other.unpackedSfixed64_.Count != 0) {
- base.AddRange(other.unpackedSfixed64_, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
}
if (other.unpackedFloat_.Count != 0) {
- base.AddRange(other.unpackedFloat_, result.unpackedFloat_);
+ result.unpackedFloat_.Add(other.unpackedFloat_);
}
if (other.unpackedDouble_.Count != 0) {
- base.AddRange(other.unpackedDouble_, result.unpackedDouble_);
+ result.unpackedDouble_.Add(other.unpackedDouble_);
}
if (other.unpackedBool_.Count != 0) {
- base.AddRange(other.unpackedBool_, result.unpackedBool_);
+ result.unpackedBool_.Add(other.unpackedBool_);
}
if (other.unpackedEnum_.Count != 0) {
- base.AddRange(other.unpackedEnum_, result.unpackedEnum_);
+ result.unpackedEnum_.Add(other.unpackedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -18149,7 +18187,7 @@
}
public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedInt32_);
+ result.unpackedInt32_.Add(values);
return this;
}
public Builder ClearUnpackedInt32() {
@@ -18179,7 +18217,7 @@
}
public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedInt64_);
+ result.unpackedInt64_.Add(values);
return this;
}
public Builder ClearUnpackedInt64() {
@@ -18214,7 +18252,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedUint32_);
+ result.unpackedUint32_.Add(values);
return this;
}
public Builder ClearUnpackedUint32() {
@@ -18249,7 +18287,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedUint64_);
+ result.unpackedUint64_.Add(values);
return this;
}
public Builder ClearUnpackedUint64() {
@@ -18279,7 +18317,7 @@
}
public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSint32_);
+ result.unpackedSint32_.Add(values);
return this;
}
public Builder ClearUnpackedSint32() {
@@ -18309,7 +18347,7 @@
}
public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSint64_);
+ result.unpackedSint64_.Add(values);
return this;
}
public Builder ClearUnpackedSint64() {
@@ -18344,7 +18382,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(values);
return this;
}
public Builder ClearUnpackedFixed32() {
@@ -18379,7 +18417,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(values);
return this;
}
public Builder ClearUnpackedFixed64() {
@@ -18409,7 +18447,7 @@
}
public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed32() {
@@ -18439,7 +18477,7 @@
}
public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed64() {
@@ -18469,7 +18507,7 @@
}
public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedFloat_);
+ result.unpackedFloat_.Add(values);
return this;
}
public Builder ClearUnpackedFloat() {
@@ -18499,7 +18537,7 @@
}
public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedDouble_);
+ result.unpackedDouble_.Add(values);
return this;
}
public Builder ClearUnpackedDouble() {
@@ -18529,7 +18567,7 @@
}
public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedBool_);
+ result.unpackedBool_.Add(values);
return this;
}
public Builder ClearUnpackedBool() {
@@ -18559,7 +18597,7 @@
}
public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
PrepareBuilder();
- base.AddRange(values, result.unpackedEnum_);
+ result.unpackedEnum_.Add(values);
return this;
}
public Builder ClearUnpackedEnum() {
@@ -18577,6 +18615,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestPackedExtensions : pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.Builder> {
+ private TestPackedExtensions() { }
private static readonly TestPackedExtensions defaultInstance = new TestPackedExtensions().MakeReadOnly();
private static readonly string[] _testPackedExtensionsFieldNames = new string[] { };
private static readonly uint[] _testPackedExtensionsFieldTags = new uint[] { };
@@ -18812,6 +18851,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestUnpackedExtensions : pb::ExtendableMessage<TestUnpackedExtensions, TestUnpackedExtensions.Builder> {
+ private TestUnpackedExtensions() { }
private static readonly TestUnpackedExtensions defaultInstance = new TestUnpackedExtensions().MakeReadOnly();
private static readonly string[] _testUnpackedExtensionsFieldNames = new string[] { };
private static readonly uint[] _testUnpackedExtensionsFieldTags = new uint[] { };
@@ -19047,6 +19087,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestDynamicExtensions : pb::GeneratedMessage<TestDynamicExtensions, TestDynamicExtensions.Builder> {
+ private TestDynamicExtensions() { }
private static readonly TestDynamicExtensions defaultInstance = new TestDynamicExtensions().MakeReadOnly();
private static readonly string[] _testDynamicExtensionsFieldNames = new string[] { "dynamic_enum_extension", "dynamic_message_extension", "enum_extension", "message_extension", "packed_extension", "repeated_extension", "scalar_extension" };
private static readonly uint[] _testDynamicExtensionsFieldTags = new uint[] { 16016, 16034, 16008, 16026, 16050, 16042, 16005 };
@@ -19087,6 +19128,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DynamicMessageType : pb::GeneratedMessage<DynamicMessageType, DynamicMessageType.Builder> {
+ private DynamicMessageType() { }
private static readonly DynamicMessageType defaultInstance = new DynamicMessageType().MakeReadOnly();
private static readonly string[] _dynamicMessageTypeFieldNames = new string[] { "dynamic_field" };
private static readonly uint[] _dynamicMessageTypeFieldTags = new uint[] { 16800 };
@@ -19653,10 +19695,10 @@
MergeDynamicMessageExtension(other.DynamicMessageExtension);
}
if (other.repeatedExtension_.Count != 0) {
- base.AddRange(other.repeatedExtension_, result.repeatedExtension_);
+ result.repeatedExtension_.Add(other.repeatedExtension_);
}
if (other.packedExtension_.Count != 0) {
- base.AddRange(other.packedExtension_, result.packedExtension_);
+ result.packedExtension_.Add(other.packedExtension_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -19931,7 +19973,7 @@
}
public Builder AddRangeRepeatedExtension(scg::IEnumerable<string> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedExtension_);
+ result.repeatedExtension_.Add(values);
return this;
}
public Builder ClearRepeatedExtension() {
@@ -19961,7 +20003,7 @@
}
public Builder AddRangePackedExtension(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.packedExtension_);
+ result.packedExtension_.Add(values);
return this;
}
public Builder ClearPackedExtension() {
@@ -19979,6 +20021,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::GeneratedMessage<TestRepeatedScalarDifferentTagSizes, TestRepeatedScalarDifferentTagSizes.Builder> {
+ private TestRepeatedScalarDifferentTagSizes() { }
private static readonly TestRepeatedScalarDifferentTagSizes defaultInstance = new TestRepeatedScalarDifferentTagSizes().MakeReadOnly();
private static readonly string[] _testRepeatedScalarDifferentTagSizesFieldNames = new string[] { "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_int32", "repeated_int64", "repeated_uint64" };
private static readonly uint[] _testRepeatedScalarDifferentTagSizesFieldTags = new uint[] { 101, 16369, 2097141, 104, 16376, 2097144 };
@@ -20292,22 +20335,22 @@
if (other == global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance) return this;
PrepareBuilder();
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -20418,7 +20461,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -20448,7 +20491,7 @@
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -20483,7 +20526,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -20513,7 +20556,7 @@
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -20543,7 +20586,7 @@
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -20578,7 +20621,7 @@
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
PrepareBuilder();
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -20596,6 +20639,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FooRequest : pb::GeneratedMessage<FooRequest, FooRequest.Builder> {
+ private FooRequest() { }
private static readonly FooRequest defaultInstance = new FooRequest().MakeReadOnly();
private static readonly string[] _fooRequestFieldNames = new string[] { };
private static readonly uint[] _fooRequestFieldTags = new uint[] { };
@@ -20826,6 +20870,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class FooResponse : pb::GeneratedMessage<FooResponse, FooResponse.Builder> {
+ private FooResponse() { }
private static readonly FooResponse defaultInstance = new FooResponse().MakeReadOnly();
private static readonly string[] _fooResponseFieldNames = new string[] { };
private static readonly uint[] _fooResponseFieldTags = new uint[] { };
@@ -21056,6 +21101,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class BarRequest : pb::GeneratedMessage<BarRequest, BarRequest.Builder> {
+ private BarRequest() { }
private static readonly BarRequest defaultInstance = new BarRequest().MakeReadOnly();
private static readonly string[] _barRequestFieldNames = new string[] { };
private static readonly uint[] _barRequestFieldTags = new uint[] { };
@@ -21286,6 +21332,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class BarResponse : pb::GeneratedMessage<BarResponse, BarResponse.Builder> {
+ private BarResponse() { }
private static readonly BarResponse defaultInstance = new BarResponse().MakeReadOnly();
private static readonly string[] _barResponseFieldNames = new string[] { };
private static readonly uint[] _barResponseFieldTags = new uint[] { };
diff --git a/todo.txt b/todo.txt
deleted file mode 100644
index 5256ca0..0000000
--- a/todo.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Current task list (not in order)
-
-- Remove multifile support
-- Docs
-- Clean up protogen code
-- Avoid using reflection for messages which don't need it (is this
- possible?)
-- Bring service generation into line with Java
-- Build protoc as a dll and use directly from protogen
-- Check copyright is everywhere
-- Work out how to unit test Silverlight code
-- Reformat code
-- Change generated format
-- Add regions to copyright
-- Build and publish binaries
-- Work out why the Compact Framework 3.5 build fails under VS2010