parent
16015a967b
commit
64bfac2825
28 changed files with 55450 additions and 1327 deletions
Binary file not shown.
@ -0,0 +1,43 @@ |
|||||||
|
// 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 = "UnitTestEmptyProtoFile"; |
||||||
|
|
||||||
|
// Protocol Buffers - Google's data interchange format |
||||||
|
// Copyright 2008 Google Inc. All rights reserved. |
||||||
|
// 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. |
||||||
|
|
||||||
|
// Author: kenton@google.com (Kenton Varda) |
||||||
|
// Based on original Protocol Buffers design by |
||||||
|
// Sanjay Ghemawat, Jeff Dean, and others. |
||||||
|
// |
||||||
|
// This file intentionally left blank. (At one point this wouldn't compile |
||||||
|
// correctly.) |
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@ |
|||||||
|
// 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 = "UnitTestImportLiteProtoFile"; |
||||||
|
|
||||||
|
// Protocol Buffers - Google's data interchange format |
||||||
|
// Copyright 2008 Google Inc. All rights reserved. |
||||||
|
// 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. |
||||||
|
|
||||||
|
// Author: kenton@google.com (Kenton Varda) |
||||||
|
// |
||||||
|
// This is like unittest_import.proto but with optimize_for = LITE_RUNTIME. |
||||||
|
|
||||||
|
package protobuf_unittest_import; |
||||||
|
|
||||||
|
option optimize_for = LITE_RUNTIME; |
||||||
|
|
||||||
|
option java_package = "com.google.protobuf"; |
||||||
|
|
||||||
|
message ImportMessageLite { |
||||||
|
optional int32 d = 1; |
||||||
|
} |
||||||
|
|
||||||
|
enum ImportEnumLite { |
||||||
|
IMPORT_LITE_FOO = 7; |
||||||
|
IMPORT_LITE_BAR = 8; |
||||||
|
IMPORT_LITE_BAZ = 9; |
||||||
|
} |
@ -0,0 +1,318 @@ |
|||||||
|
// 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 = "UnitTestLiteProtoFile"; |
||||||
|
|
||||||
|
// Protocol Buffers - Google's data interchange format |
||||||
|
// Copyright 2008 Google Inc. All rights reserved. |
||||||
|
// 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. |
||||||
|
|
||||||
|
// Author: kenton@google.com (Kenton Varda) |
||||||
|
// |
||||||
|
// This is like unittest.proto but with optimize_for = LITE_RUNTIME. |
||||||
|
|
||||||
|
package protobuf_unittest; |
||||||
|
|
||||||
|
import "google/protobuf/unittest_import_lite.proto"; |
||||||
|
|
||||||
|
option optimize_for = LITE_RUNTIME; |
||||||
|
|
||||||
|
option java_package = "com.google.protobuf"; |
||||||
|
|
||||||
|
// Same as TestAllTypes but with the lite runtime. |
||||||
|
message TestAllTypesLite { |
||||||
|
message NestedMessage { |
||||||
|
optional int32 bb = 1; |
||||||
|
} |
||||||
|
|
||||||
|
enum NestedEnum { |
||||||
|
FOO = 1; |
||||||
|
BAR = 2; |
||||||
|
BAZ = 3; |
||||||
|
} |
||||||
|
|
||||||
|
// Singular |
||||||
|
optional int32 optional_int32 = 1; |
||||||
|
optional int64 optional_int64 = 2; |
||||||
|
optional uint32 optional_uint32 = 3; |
||||||
|
optional uint64 optional_uint64 = 4; |
||||||
|
optional sint32 optional_sint32 = 5; |
||||||
|
optional sint64 optional_sint64 = 6; |
||||||
|
optional fixed32 optional_fixed32 = 7; |
||||||
|
optional fixed64 optional_fixed64 = 8; |
||||||
|
optional sfixed32 optional_sfixed32 = 9; |
||||||
|
optional sfixed64 optional_sfixed64 = 10; |
||||||
|
optional float optional_float = 11; |
||||||
|
optional double optional_double = 12; |
||||||
|
optional bool optional_bool = 13; |
||||||
|
optional string optional_string = 14; |
||||||
|
optional bytes optional_bytes = 15; |
||||||
|
|
||||||
|
optional group OptionalGroup = 16 { |
||||||
|
optional int32 a = 17; |
||||||
|
} |
||||||
|
|
||||||
|
optional NestedMessage optional_nested_message = 18; |
||||||
|
optional ForeignMessageLite optional_foreign_message = 19; |
||||||
|
optional protobuf_unittest_import.ImportMessageLite |
||||||
|
optional_import_message = 20; |
||||||
|
|
||||||
|
optional NestedEnum optional_nested_enum = 21; |
||||||
|
optional ForeignEnumLite optional_foreign_enum = 22; |
||||||
|
optional protobuf_unittest_import.ImportEnumLite optional_import_enum = 23; |
||||||
|
|
||||||
|
optional string optional_string_piece = 24 [ctype=STRING_PIECE]; |
||||||
|
optional string optional_cord = 25 [ctype=CORD]; |
||||||
|
|
||||||
|
// Repeated |
||||||
|
repeated int32 repeated_int32 = 31; |
||||||
|
repeated int64 repeated_int64 = 32; |
||||||
|
repeated uint32 repeated_uint32 = 33; |
||||||
|
repeated uint64 repeated_uint64 = 34; |
||||||
|
repeated sint32 repeated_sint32 = 35; |
||||||
|
repeated sint64 repeated_sint64 = 36; |
||||||
|
repeated fixed32 repeated_fixed32 = 37; |
||||||
|
repeated fixed64 repeated_fixed64 = 38; |
||||||
|
repeated sfixed32 repeated_sfixed32 = 39; |
||||||
|
repeated sfixed64 repeated_sfixed64 = 40; |
||||||
|
repeated float repeated_float = 41; |
||||||
|
repeated double repeated_double = 42; |
||||||
|
repeated bool repeated_bool = 43; |
||||||
|
repeated string repeated_string = 44; |
||||||
|
repeated bytes repeated_bytes = 45; |
||||||
|
|
||||||
|
repeated group RepeatedGroup = 46 { |
||||||
|
optional int32 a = 47; |
||||||
|
} |
||||||
|
|
||||||
|
repeated NestedMessage repeated_nested_message = 48; |
||||||
|
repeated ForeignMessageLite repeated_foreign_message = 49; |
||||||
|
repeated protobuf_unittest_import.ImportMessageLite |
||||||
|
repeated_import_message = 50; |
||||||
|
|
||||||
|
repeated NestedEnum repeated_nested_enum = 51; |
||||||
|
repeated ForeignEnumLite repeated_foreign_enum = 52; |
||||||
|
repeated protobuf_unittest_import.ImportEnumLite repeated_import_enum = 53; |
||||||
|
|
||||||
|
repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; |
||||||
|
repeated string repeated_cord = 55 [ctype=CORD]; |
||||||
|
|
||||||
|
// Singular with defaults |
||||||
|
optional int32 default_int32 = 61 [default = 41 ]; |
||||||
|
optional int64 default_int64 = 62 [default = 42 ]; |
||||||
|
optional uint32 default_uint32 = 63 [default = 43 ]; |
||||||
|
optional uint64 default_uint64 = 64 [default = 44 ]; |
||||||
|
optional sint32 default_sint32 = 65 [default = -45 ]; |
||||||
|
optional sint64 default_sint64 = 66 [default = 46 ]; |
||||||
|
optional fixed32 default_fixed32 = 67 [default = 47 ]; |
||||||
|
optional fixed64 default_fixed64 = 68 [default = 48 ]; |
||||||
|
optional sfixed32 default_sfixed32 = 69 [default = 49 ]; |
||||||
|
optional sfixed64 default_sfixed64 = 70 [default = -50 ]; |
||||||
|
optional float default_float = 71 [default = 51.5 ]; |
||||||
|
optional double default_double = 72 [default = 52e3 ]; |
||||||
|
optional bool default_bool = 73 [default = true ]; |
||||||
|
optional string default_string = 74 [default = "hello"]; |
||||||
|
optional bytes default_bytes = 75 [default = "world"]; |
||||||
|
|
||||||
|
optional NestedEnum default_nested_enum = 81 [default = BAR]; |
||||||
|
optional ForeignEnumLite default_foreign_enum = 82 |
||||||
|
[default = FOREIGN_LITE_BAR]; |
||||||
|
optional protobuf_unittest_import.ImportEnumLite |
||||||
|
default_import_enum = 83 [default = IMPORT_LITE_BAR]; |
||||||
|
|
||||||
|
optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"]; |
||||||
|
optional string default_cord = 85 [ctype=CORD,default="123"]; |
||||||
|
} |
||||||
|
|
||||||
|
message ForeignMessageLite { |
||||||
|
optional int32 c = 1; |
||||||
|
} |
||||||
|
|
||||||
|
enum ForeignEnumLite { |
||||||
|
FOREIGN_LITE_FOO = 4; |
||||||
|
FOREIGN_LITE_BAR = 5; |
||||||
|
FOREIGN_LITE_BAZ = 6; |
||||||
|
} |
||||||
|
|
||||||
|
message TestPackedTypesLite { |
||||||
|
repeated int32 packed_int32 = 90 [packed = true]; |
||||||
|
repeated int64 packed_int64 = 91 [packed = true]; |
||||||
|
repeated uint32 packed_uint32 = 92 [packed = true]; |
||||||
|
repeated uint64 packed_uint64 = 93 [packed = true]; |
||||||
|
repeated sint32 packed_sint32 = 94 [packed = true]; |
||||||
|
repeated sint64 packed_sint64 = 95 [packed = true]; |
||||||
|
repeated fixed32 packed_fixed32 = 96 [packed = true]; |
||||||
|
repeated fixed64 packed_fixed64 = 97 [packed = true]; |
||||||
|
repeated sfixed32 packed_sfixed32 = 98 [packed = true]; |
||||||
|
repeated sfixed64 packed_sfixed64 = 99 [packed = true]; |
||||||
|
repeated float packed_float = 100 [packed = true]; |
||||||
|
repeated double packed_double = 101 [packed = true]; |
||||||
|
repeated bool packed_bool = 102 [packed = true]; |
||||||
|
repeated ForeignEnumLite packed_enum = 103 [packed = true]; |
||||||
|
} |
||||||
|
|
||||||
|
message TestAllExtensionsLite { |
||||||
|
extensions 1 to max; |
||||||
|
} |
||||||
|
|
||||||
|
extend TestAllExtensionsLite { |
||||||
|
// Singular |
||||||
|
optional int32 optional_int32_extension_lite = 1; |
||||||
|
optional int64 optional_int64_extension_lite = 2; |
||||||
|
optional uint32 optional_uint32_extension_lite = 3; |
||||||
|
optional uint64 optional_uint64_extension_lite = 4; |
||||||
|
optional sint32 optional_sint32_extension_lite = 5; |
||||||
|
optional sint64 optional_sint64_extension_lite = 6; |
||||||
|
optional fixed32 optional_fixed32_extension_lite = 7; |
||||||
|
optional fixed64 optional_fixed64_extension_lite = 8; |
||||||
|
optional sfixed32 optional_sfixed32_extension_lite = 9; |
||||||
|
optional sfixed64 optional_sfixed64_extension_lite = 10; |
||||||
|
optional float optional_float_extension_lite = 11; |
||||||
|
optional double optional_double_extension_lite = 12; |
||||||
|
optional bool optional_bool_extension_lite = 13; |
||||||
|
optional string optional_string_extension_lite = 14; |
||||||
|
optional bytes optional_bytes_extension_lite = 15; |
||||||
|
|
||||||
|
optional group OptionalGroup_extension_lite = 16 { |
||||||
|
optional int32 a = 17; |
||||||
|
} |
||||||
|
|
||||||
|
optional TestAllTypesLite.NestedMessage optional_nested_message_extension_lite |
||||||
|
= 18; |
||||||
|
optional ForeignMessageLite optional_foreign_message_extension_lite = 19; |
||||||
|
optional protobuf_unittest_import.ImportMessageLite |
||||||
|
optional_import_message_extension_lite = 20; |
||||||
|
|
||||||
|
optional TestAllTypesLite.NestedEnum optional_nested_enum_extension_lite = 21; |
||||||
|
optional ForeignEnumLite optional_foreign_enum_extension_lite = 22; |
||||||
|
optional protobuf_unittest_import.ImportEnumLite |
||||||
|
optional_import_enum_extension_lite = 23; |
||||||
|
|
||||||
|
optional string optional_string_piece_extension_lite = 24 |
||||||
|
[ctype=STRING_PIECE]; |
||||||
|
optional string optional_cord_extension_lite = 25 [ctype=CORD]; |
||||||
|
|
||||||
|
// Repeated |
||||||
|
repeated int32 repeated_int32_extension_lite = 31; |
||||||
|
repeated int64 repeated_int64_extension_lite = 32; |
||||||
|
repeated uint32 repeated_uint32_extension_lite = 33; |
||||||
|
repeated uint64 repeated_uint64_extension_lite = 34; |
||||||
|
repeated sint32 repeated_sint32_extension_lite = 35; |
||||||
|
repeated sint64 repeated_sint64_extension_lite = 36; |
||||||
|
repeated fixed32 repeated_fixed32_extension_lite = 37; |
||||||
|
repeated fixed64 repeated_fixed64_extension_lite = 38; |
||||||
|
repeated sfixed32 repeated_sfixed32_extension_lite = 39; |
||||||
|
repeated sfixed64 repeated_sfixed64_extension_lite = 40; |
||||||
|
repeated float repeated_float_extension_lite = 41; |
||||||
|
repeated double repeated_double_extension_lite = 42; |
||||||
|
repeated bool repeated_bool_extension_lite = 43; |
||||||
|
repeated string repeated_string_extension_lite = 44; |
||||||
|
repeated bytes repeated_bytes_extension_lite = 45; |
||||||
|
|
||||||
|
repeated group RepeatedGroup_extension_lite = 46 { |
||||||
|
optional int32 a = 47; |
||||||
|
} |
||||||
|
|
||||||
|
repeated TestAllTypesLite.NestedMessage repeated_nested_message_extension_lite |
||||||
|
= 48; |
||||||
|
repeated ForeignMessageLite repeated_foreign_message_extension_lite = 49; |
||||||
|
repeated protobuf_unittest_import.ImportMessageLite |
||||||
|
repeated_import_message_extension_lite = 50; |
||||||
|
|
||||||
|
repeated TestAllTypesLite.NestedEnum repeated_nested_enum_extension_lite = 51; |
||||||
|
repeated ForeignEnumLite repeated_foreign_enum_extension_lite = 52; |
||||||
|
repeated protobuf_unittest_import.ImportEnumLite |
||||||
|
repeated_import_enum_extension_lite = 53; |
||||||
|
|
||||||
|
repeated string repeated_string_piece_extension_lite = 54 |
||||||
|
[ctype=STRING_PIECE]; |
||||||
|
repeated string repeated_cord_extension_lite = 55 [ctype=CORD]; |
||||||
|
|
||||||
|
// Singular with defaults |
||||||
|
optional int32 default_int32_extension_lite = 61 [default = 41 ]; |
||||||
|
optional int64 default_int64_extension_lite = 62 [default = 42 ]; |
||||||
|
optional uint32 default_uint32_extension_lite = 63 [default = 43 ]; |
||||||
|
optional uint64 default_uint64_extension_lite = 64 [default = 44 ]; |
||||||
|
optional sint32 default_sint32_extension_lite = 65 [default = -45 ]; |
||||||
|
optional sint64 default_sint64_extension_lite = 66 [default = 46 ]; |
||||||
|
optional fixed32 default_fixed32_extension_lite = 67 [default = 47 ]; |
||||||
|
optional fixed64 default_fixed64_extension_lite = 68 [default = 48 ]; |
||||||
|
optional sfixed32 default_sfixed32_extension_lite = 69 [default = 49 ]; |
||||||
|
optional sfixed64 default_sfixed64_extension_lite = 70 [default = -50 ]; |
||||||
|
optional float default_float_extension_lite = 71 [default = 51.5 ]; |
||||||
|
optional double default_double_extension_lite = 72 [default = 52e3 ]; |
||||||
|
optional bool default_bool_extension_lite = 73 [default = true ]; |
||||||
|
optional string default_string_extension_lite = 74 [default = "hello"]; |
||||||
|
optional bytes default_bytes_extension_lite = 75 [default = "world"]; |
||||||
|
|
||||||
|
optional TestAllTypesLite.NestedEnum |
||||||
|
default_nested_enum_extension_lite = 81 [default = BAR]; |
||||||
|
optional ForeignEnumLite |
||||||
|
default_foreign_enum_extension_lite = 82 [default = FOREIGN_LITE_BAR]; |
||||||
|
optional protobuf_unittest_import.ImportEnumLite |
||||||
|
default_import_enum_extension_lite = 83 [default = IMPORT_LITE_BAR]; |
||||||
|
|
||||||
|
optional string default_string_piece_extension_lite = 84 [ctype=STRING_PIECE, |
||||||
|
default="abc"]; |
||||||
|
optional string default_cord_extension_lite = 85 [ctype=CORD, default="123"]; |
||||||
|
} |
||||||
|
|
||||||
|
message TestPackedExtensionsLite { |
||||||
|
extensions 1 to max; |
||||||
|
} |
||||||
|
|
||||||
|
extend TestPackedExtensionsLite { |
||||||
|
repeated int32 packed_int32_extension_lite = 90 [packed = true]; |
||||||
|
repeated int64 packed_int64_extension_lite = 91 [packed = true]; |
||||||
|
repeated uint32 packed_uint32_extension_lite = 92 [packed = true]; |
||||||
|
repeated uint64 packed_uint64_extension_lite = 93 [packed = true]; |
||||||
|
repeated sint32 packed_sint32_extension_lite = 94 [packed = true]; |
||||||
|
repeated sint64 packed_sint64_extension_lite = 95 [packed = true]; |
||||||
|
repeated fixed32 packed_fixed32_extension_lite = 96 [packed = true]; |
||||||
|
repeated fixed64 packed_fixed64_extension_lite = 97 [packed = true]; |
||||||
|
repeated sfixed32 packed_sfixed32_extension_lite = 98 [packed = true]; |
||||||
|
repeated sfixed64 packed_sfixed64_extension_lite = 99 [packed = true]; |
||||||
|
repeated float packed_float_extension_lite = 100 [packed = true]; |
||||||
|
repeated double packed_double_extension_lite = 101 [packed = true]; |
||||||
|
repeated bool packed_bool_extension_lite = 102 [packed = true]; |
||||||
|
repeated ForeignEnumLite packed_enum_extension_lite = 103 [packed = true]; |
||||||
|
} |
||||||
|
|
||||||
|
message TestNestedExtensionLite { |
||||||
|
extend TestAllExtensionsLite { |
||||||
|
optional int32 nested_extension = 12345; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Test that deprecated fields work. We only verify that they compile (at one |
||||||
|
// point this failed). |
||||||
|
message TestDeprecatedLite { |
||||||
|
optional int32 deprecated_field = 1 [deprecated = true]; |
||||||
|
} |
@ -0,0 +1,49 @@ |
|||||||
|
// 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 = "UnitTestLiteImportNonLiteProtoFile"; |
||||||
|
|
||||||
|
// Protocol Buffers - Google's data interchange format |
||||||
|
// Copyright 2008 Google Inc. All rights reserved. |
||||||
|
// 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. |
||||||
|
|
||||||
|
// Author: kenton@google.com (Kenton Varda) |
||||||
|
// |
||||||
|
// Tests that a "lite" message can import a regular message. |
||||||
|
|
||||||
|
package protobuf_unittest; |
||||||
|
|
||||||
|
import "google/protobuf/unittest.proto"; |
||||||
|
|
||||||
|
option optimize_for = LITE_RUNTIME; |
||||||
|
|
||||||
|
message TestLiteImportsNonlite { |
||||||
|
optional TestAllTypes message = 1; |
||||||
|
} |
@ -0,0 +1,60 @@ |
|||||||
|
// 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.NoGenericService"; |
||||||
|
option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestNoGenericServicesProtoFile"; |
||||||
|
|
||||||
|
// Protocol Buffers - Google's data interchange format |
||||||
|
// Copyright 2008 Google Inc. All rights reserved. |
||||||
|
// 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. |
||||||
|
|
||||||
|
// Author: kenton@google.com (Kenton Varda) |
||||||
|
|
||||||
|
package google.protobuf.no_generic_services_test; |
||||||
|
|
||||||
|
option cc_generic_services = false; |
||||||
|
option java_generic_services = false; |
||||||
|
option py_generic_services = false; |
||||||
|
|
||||||
|
message TestMessage { |
||||||
|
optional int32 a = 1; |
||||||
|
extensions 1000 to max; |
||||||
|
} |
||||||
|
|
||||||
|
enum TestEnum { |
||||||
|
FOO = 1; |
||||||
|
} |
||||||
|
|
||||||
|
extend TestMessage { |
||||||
|
optional int32 test_extension = 1000; |
||||||
|
} |
||||||
|
|
||||||
|
service TestService { |
||||||
|
rpc Foo(TestMessage) returns(TestMessage); |
||||||
|
} |
@ -0,0 +1,44 @@ |
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||||
|
|
||||||
|
using pb = global::Google.ProtocolBuffers; |
||||||
|
using pbc = global::Google.ProtocolBuffers.Collections; |
||||||
|
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||||
|
using scg = global::System.Collections.Generic; |
||||||
|
namespace Google.ProtocolBuffers.TestProtos { |
||||||
|
|
||||||
|
public static partial class UnitTestEmptyProtoFile { |
||||||
|
|
||||||
|
#region Extension registration |
||||||
|
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||||
|
} |
||||||
|
#endregion |
||||||
|
#region Static variables |
||||||
|
#endregion |
||||||
|
#region Descriptor |
||||||
|
public static pbd::FileDescriptor Descriptor { |
||||||
|
get { return descriptor; } |
||||||
|
} |
||||||
|
private static pbd::FileDescriptor descriptor; |
||||||
|
|
||||||
|
static UnitTestEmptyProtoFile() { |
||||||
|
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||||
|
"CiRnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1wdHkucHJvdG8aJGdvb2ds" + |
||||||
|
"ZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90b0I+wj47CiFHb29nbGUu" + |
||||||
|
"UHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSFlVuaXRUZXN0RW1wdHlQcm90" + |
||||||
|
"b0ZpbGU="); |
||||||
|
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||||
|
descriptor = root; |
||||||
|
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||||
|
RegisterAllExtensions(registry); |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); |
||||||
|
return registry; |
||||||
|
}; |
||||||
|
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||||
|
new pbd::FileDescriptor[] { |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, |
||||||
|
}, assigner); |
||||||
|
} |
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
||||||
|
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,196 @@ |
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||||
|
|
||||||
|
using pb = global::Google.ProtocolBuffers; |
||||||
|
using pbc = global::Google.ProtocolBuffers.Collections; |
||||||
|
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||||
|
using scg = global::System.Collections.Generic; |
||||||
|
namespace Google.ProtocolBuffers.TestProtos { |
||||||
|
|
||||||
|
public static partial class UnitTestImportLiteProtoFile { |
||||||
|
|
||||||
|
#region Extension registration |
||||||
|
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||||
|
} |
||||||
|
#endregion |
||||||
|
#region Static variables |
||||||
|
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor; |
||||||
|
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessageLite, global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.Builder> internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable; |
||||||
|
#endregion |
||||||
|
#region Descriptor |
||||||
|
public static pbd::FileDescriptor Descriptor { |
||||||
|
get { return descriptor; } |
||||||
|
} |
||||||
|
private static pbd::FileDescriptor descriptor; |
||||||
|
|
||||||
|
static UnitTestImportLiteProtoFile() { |
||||||
|
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||||
|
"Cipnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0X2xpdGUucHJvdG8S" + |
||||||
|
"GHByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydBokZ29vZ2xlL3Byb3RvYnVmL2Nz" + |
||||||
|
"aGFycF9vcHRpb25zLnByb3RvIh4KEUltcG9ydE1lc3NhZ2VMaXRlEgkKAWQY" + |
||||||
|
"ASABKAUqTwoOSW1wb3J0RW51bUxpdGUSEwoPSU1QT1JUX0xJVEVfRk9PEAcS" + |
||||||
|
"EwoPSU1QT1JUX0xJVEVfQkFSEAgSEwoPSU1QT1JUX0xJVEVfQkFaEAlCWgoT" + |
||||||
|
"Y29tLmdvb2dsZS5wcm90b2J1ZkgDwj5ACiFHb29nbGUuUHJvdG9jb2xCdWZm" + |
||||||
|
"ZXJzLlRlc3RQcm90b3MSG1VuaXRUZXN0SW1wb3J0TGl0ZVByb3RvRmlsZQ=="); |
||||||
|
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||||
|
descriptor = root; |
||||||
|
internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor = Descriptor.MessageTypes[0]; |
||||||
|
internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable = |
||||||
|
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessageLite, global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.Builder>(internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor, |
||||||
|
new string[] { "D", }); |
||||||
|
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||||
|
RegisterAllExtensions(registry); |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); |
||||||
|
return registry; |
||||||
|
}; |
||||||
|
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||||
|
new pbd::FileDescriptor[] { |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, |
||||||
|
}, assigner); |
||||||
|
} |
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
||||||
|
#region Enums |
||||||
|
public enum ImportEnumLite { |
||||||
|
IMPORT_LITE_FOO = 7, |
||||||
|
IMPORT_LITE_BAR = 8, |
||||||
|
IMPORT_LITE_BAZ = 9, |
||||||
|
} |
||||||
|
|
||||||
|
#endregion |
||||||
|
|
||||||
|
#region Messages |
||||||
|
public sealed partial class ImportMessageLite : pb::GeneratedMessage<ImportMessageLite, ImportMessageLite.Builder> { |
||||||
|
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); |
||||||
|
public static ImportMessageLite DefaultInstance { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override ImportMessageLite DefaultInstanceForType { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override ImportMessageLite ThisMessage { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
|
||||||
|
public static pbd::MessageDescriptor Descriptor { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override pb::FieldAccess.FieldAccessorTable<ImportMessageLite, ImportMessageLite.Builder> InternalFieldAccessors { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable; } |
||||||
|
} |
||||||
|
|
||||||
|
public const int DFieldNumber = 1; |
||||||
|
private bool hasD; |
||||||
|
private int d_ = 0; |
||||||
|
public bool HasD { |
||||||
|
get { return hasD; } |
||||||
|
} |
||||||
|
public int D { |
||||||
|
get { return d_; } |
||||||
|
} |
||||||
|
|
||||||
|
public static ImportMessageLite ParseFrom(pb::ByteString data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(byte[] data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static ImportMessageLite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
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(ImportMessageLite prototype) { |
||||||
|
return (Builder) new Builder().MergeFrom(prototype); |
||||||
|
} |
||||||
|
|
||||||
|
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessageLite, Builder> { |
||||||
|
protected override Builder ThisBuilder { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
public Builder() {} |
||||||
|
|
||||||
|
ImportMessageLite result = new ImportMessageLite(); |
||||||
|
|
||||||
|
protected override ImportMessageLite MessageBeingBuilt { |
||||||
|
get { return result; } |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clear() { |
||||||
|
result = new ImportMessageLite(); |
||||||
|
return this; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clone() { |
||||||
|
return new Builder().MergeFrom(result); |
||||||
|
} |
||||||
|
|
||||||
|
public override pbd::MessageDescriptor DescriptorForType { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
public override ImportMessageLite DefaultInstanceForType { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override ImportMessageLite BuildPartial() { |
||||||
|
if (result == null) { |
||||||
|
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||||
|
} |
||||||
|
ImportMessageLite returnMe = result; |
||||||
|
result = null; |
||||||
|
return returnMe; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public bool HasD { |
||||||
|
get { return result.HasD; } |
||||||
|
} |
||||||
|
public int D { |
||||||
|
get { return result.D; } |
||||||
|
set { SetD(value); } |
||||||
|
} |
||||||
|
public Builder SetD(int value) { |
||||||
|
result.hasD = true; |
||||||
|
result.d_ = value; |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder ClearD() { |
||||||
|
result.hasD = false; |
||||||
|
result.d_ = 0; |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
||||||
|
static ImportMessageLite() { |
||||||
|
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
@ -0,0 +1,382 @@ |
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||||
|
|
||||||
|
using pb = global::Google.ProtocolBuffers; |
||||||
|
using pbc = global::Google.ProtocolBuffers.Collections; |
||||||
|
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||||
|
using scg = global::System.Collections.Generic; |
||||||
|
namespace Google.ProtocolBuffers.TestProtos.NoGenericService { |
||||||
|
|
||||||
|
public static partial class UnitTestNoGenericServicesProtoFile { |
||||||
|
|
||||||
|
#region Extension registration |
||||||
|
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||||
|
registry.Add(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension); |
||||||
|
} |
||||||
|
#endregion |
||||||
|
#region Extensions |
||||||
|
public const int TestExtensionFieldNumber = 1000; |
||||||
|
public static pb::GeneratedExtensionBase<int> TestExtension; |
||||||
|
#endregion |
||||||
|
|
||||||
|
#region Static variables |
||||||
|
internal static pbd::MessageDescriptor internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; |
||||||
|
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder> internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; |
||||||
|
#endregion |
||||||
|
#region Descriptor |
||||||
|
public static pbd::FileDescriptor Descriptor { |
||||||
|
get { return descriptor; } |
||||||
|
} |
||||||
|
private static pbd::FileDescriptor descriptor; |
||||||
|
|
||||||
|
static UnitTestNoGenericServicesProtoFile() { |
||||||
|
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||||
|
"CjJnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfbm9fZ2VuZXJpY19zZXJ2aWNl" + |
||||||
|
"cy5wcm90bxIoZ29vZ2xlLnByb3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNf" + |
||||||
|
"dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnByb3RvIiMK" + |
||||||
|
"C1Rlc3RNZXNzYWdlEgkKAWEYASABKAUqCQjoBxCAgICAAioTCghUZXN0RW51" + |
||||||
|
"bRIHCgNGT08QATKCAQoLVGVzdFNlcnZpY2UScwoDRm9vEjUuZ29vZ2xlLnBy" + |
||||||
|
"b3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNfdGVzdC5UZXN0TWVzc2FnZRo1" + |
||||||
|
"Lmdvb2dsZS5wcm90b2J1Zi5ub19nZW5lcmljX3NlcnZpY2VzX3Rlc3QuVGVz" + |
||||||
|
"dE1lc3NhZ2U6TgoOdGVzdF9leHRlbnNpb24SNS5nb29nbGUucHJvdG9idWYu" + |
||||||
|
"bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJk" + |
||||||
|
"gAEAiAEAkAEAwj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90" + |
||||||
|
"b3MuTm9HZW5lcmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNl" + |
||||||
|
"c1Byb3RvRmlsZQ=="); |
||||||
|
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||||
|
descriptor = root; |
||||||
|
internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||||
|
internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable = |
||||||
|
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor, |
||||||
|
new string[] { "A", }); |
||||||
|
global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor.Extensions[0]); |
||||||
|
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||||
|
RegisterAllExtensions(registry); |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); |
||||||
|
return registry; |
||||||
|
}; |
||||||
|
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||||
|
new pbd::FileDescriptor[] { |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, |
||||||
|
}, assigner); |
||||||
|
} |
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
||||||
|
#region Enums |
||||||
|
public enum TestEnum { |
||||||
|
FOO = 1, |
||||||
|
} |
||||||
|
|
||||||
|
#endregion |
||||||
|
|
||||||
|
#region Messages |
||||||
|
public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> { |
||||||
|
private static readonly TestMessage defaultInstance = new Builder().BuildPartial(); |
||||||
|
public static TestMessage DefaultInstance { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestMessage DefaultInstanceForType { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override TestMessage ThisMessage { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
|
||||||
|
public static pbd::MessageDescriptor Descriptor { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override pb::FieldAccess.FieldAccessorTable<TestMessage, TestMessage.Builder> InternalFieldAccessors { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; } |
||||||
|
} |
||||||
|
|
||||||
|
public const int AFieldNumber = 1; |
||||||
|
private bool hasA; |
||||||
|
private int a_ = 0; |
||||||
|
public bool HasA { |
||||||
|
get { return hasA; } |
||||||
|
} |
||||||
|
public int A { |
||||||
|
get { return a_; } |
||||||
|
} |
||||||
|
|
||||||
|
public override bool IsInitialized { |
||||||
|
get { |
||||||
|
if (!ExtensionsAreInitialized) return false; |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public override void WriteTo(pb::CodedOutputStream output) { |
||||||
|
int size = SerializedSize; |
||||||
|
pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); |
||||||
|
if (HasA) { |
||||||
|
output.WriteInt32(1, A); |
||||||
|
} |
||||||
|
extensionWriter.WriteUntil(536870912, output); |
||||||
|
UnknownFields.WriteTo(output); |
||||||
|
} |
||||||
|
|
||||||
|
private int memoizedSerializedSize = -1; |
||||||
|
public override int SerializedSize { |
||||||
|
get { |
||||||
|
int size = memoizedSerializedSize; |
||||||
|
if (size != -1) return size; |
||||||
|
|
||||||
|
size = 0; |
||||||
|
if (HasA) { |
||||||
|
size += pb::CodedOutputStream.ComputeInt32Size(1, A); |
||||||
|
} |
||||||
|
size += ExtensionsSerializedSize; |
||||||
|
size += UnknownFields.SerializedSize; |
||||||
|
memoizedSerializedSize = size; |
||||||
|
return size; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static TestMessage ParseFrom(pb::ByteString data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(byte[] data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(global::System.IO.Stream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(pb::CodedInputStream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
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(TestMessage prototype) { |
||||||
|
return (Builder) new Builder().MergeFrom(prototype); |
||||||
|
} |
||||||
|
|
||||||
|
public sealed partial class Builder : pb::ExtendableBuilder<TestMessage, Builder> { |
||||||
|
protected override Builder ThisBuilder { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
public Builder() {} |
||||||
|
|
||||||
|
TestMessage result = new TestMessage(); |
||||||
|
|
||||||
|
protected override TestMessage MessageBeingBuilt { |
||||||
|
get { return result; } |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clear() { |
||||||
|
result = new TestMessage(); |
||||||
|
return this; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clone() { |
||||||
|
return new Builder().MergeFrom(result); |
||||||
|
} |
||||||
|
|
||||||
|
public override pbd::MessageDescriptor DescriptorForType { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestMessage DefaultInstanceForType { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestMessage BuildPartial() { |
||||||
|
if (result == null) { |
||||||
|
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||||
|
} |
||||||
|
TestMessage returnMe = result; |
||||||
|
result = null; |
||||||
|
return returnMe; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(pb::IMessage other) { |
||||||
|
if (other is TestMessage) { |
||||||
|
return MergeFrom((TestMessage) other); |
||||||
|
} else { |
||||||
|
base.MergeFrom(other); |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(TestMessage other) { |
||||||
|
if (other == global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance) return this; |
||||||
|
if (other.HasA) { |
||||||
|
A = other.A; |
||||||
|
} |
||||||
|
this.MergeExtensionFields(other); |
||||||
|
this.MergeUnknownFields(other.UnknownFields); |
||||||
|
return this; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(pb::CodedInputStream input) { |
||||||
|
return MergeFrom(input, pb::ExtensionRegistry.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
pb::UnknownFieldSet.Builder unknownFields = null; |
||||||
|
while (true) { |
||||||
|
uint tag = input.ReadTag(); |
||||||
|
switch (tag) { |
||||||
|
case 0: { |
||||||
|
if (unknownFields != null) { |
||||||
|
this.UnknownFields = unknownFields.Build(); |
||||||
|
} |
||||||
|
return this; |
||||||
|
} |
||||||
|
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); |
||||||
|
break; |
||||||
|
} |
||||||
|
case 8: { |
||||||
|
A = input.ReadInt32(); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public bool HasA { |
||||||
|
get { return result.HasA; } |
||||||
|
} |
||||||
|
public int A { |
||||||
|
get { return result.A; } |
||||||
|
set { SetA(value); } |
||||||
|
} |
||||||
|
public Builder SetA(int value) { |
||||||
|
result.hasA = true; |
||||||
|
result.a_ = value; |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder ClearA() { |
||||||
|
result.hasA = false; |
||||||
|
result.a_ = 0; |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
||||||
|
static TestMessage() { |
||||||
|
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor, null); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#endregion |
||||||
|
|
||||||
|
#region Services |
||||||
|
public abstract class TestService : pb::IService { |
||||||
|
public abstract void Foo( |
||||||
|
pb::IRpcController controller, |
||||||
|
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, |
||||||
|
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done); |
||||||
|
|
||||||
|
public static pbd::ServiceDescriptor Descriptor { |
||||||
|
get { return UnitTestNoGenericServicesProtoFile.Descriptor.Services[0]; } |
||||||
|
} |
||||||
|
public pbd::ServiceDescriptor DescriptorForType { |
||||||
|
get { return Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
public void CallMethod( |
||||||
|
pbd::MethodDescriptor method, |
||||||
|
pb::IRpcController controller, |
||||||
|
pb::IMessage request, |
||||||
|
global::System.Action<pb::IMessage> done) { |
||||||
|
if (method.Service != Descriptor) { |
||||||
|
throw new global::System.ArgumentException( |
||||||
|
"Service.CallMethod() given method descriptor for wrong service type."); |
||||||
|
} |
||||||
|
switch(method.Index) { |
||||||
|
case 0: |
||||||
|
this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage) request, |
||||||
|
pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage>( |
||||||
|
done)); |
||||||
|
return; |
||||||
|
default: |
||||||
|
throw new global::System.InvalidOperationException("Can't get here."); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) { |
||||||
|
if (method.Service != Descriptor) { |
||||||
|
throw new global::System.ArgumentException( |
||||||
|
"Service.GetRequestPrototype() given method descriptor for wrong service type."); |
||||||
|
} |
||||||
|
switch(method.Index) { |
||||||
|
case 0: |
||||||
|
return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; |
||||||
|
default: |
||||||
|
throw new global::System.InvalidOperationException("Can't get here."); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) { |
||||||
|
if (method.Service != Descriptor) { |
||||||
|
throw new global::System.ArgumentException( |
||||||
|
"Service.GetResponsePrototype() given method descriptor for wrong service type."); |
||||||
|
} |
||||||
|
switch(method.Index) { |
||||||
|
case 0: |
||||||
|
return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; |
||||||
|
default: |
||||||
|
throw new global::System.InvalidOperationException("Can't get here."); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static Stub CreateStub(pb::IRpcChannel channel) { |
||||||
|
return new Stub(channel); |
||||||
|
} |
||||||
|
|
||||||
|
public class Stub : global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestService { |
||||||
|
internal Stub(pb::IRpcChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
private readonly pb::IRpcChannel channel; |
||||||
|
|
||||||
|
public pb::IRpcChannel Channel { |
||||||
|
get { return channel; } |
||||||
|
} |
||||||
|
|
||||||
|
public override void Foo( |
||||||
|
pb::IRpcController controller, |
||||||
|
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, |
||||||
|
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done) { |
||||||
|
channel.CallMethod(Descriptor.Methods[0], |
||||||
|
controller, request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance, |
||||||
|
pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(done, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance)); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,207 @@ |
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||||
|
|
||||||
|
using pb = global::Google.ProtocolBuffers; |
||||||
|
using pbc = global::Google.ProtocolBuffers.Collections; |
||||||
|
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||||
|
using scg = global::System.Collections.Generic; |
||||||
|
namespace Google.ProtocolBuffers.TestProtos { |
||||||
|
|
||||||
|
public static partial class UnitTestLiteImportNonLiteProtoFile { |
||||||
|
|
||||||
|
#region Extension registration |
||||||
|
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||||
|
} |
||||||
|
#endregion |
||||||
|
#region Static variables |
||||||
|
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor; |
||||||
|
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite, global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.Builder> internal__static_protobuf_unittest_TestLiteImportsNonlite__FieldAccessorTable; |
||||||
|
#endregion |
||||||
|
#region Descriptor |
||||||
|
public static pbd::FileDescriptor Descriptor { |
||||||
|
get { return descriptor; } |
||||||
|
} |
||||||
|
private static pbd::FileDescriptor descriptor; |
||||||
|
|
||||||
|
static UnitTestLiteImportNonLiteProtoFile() { |
||||||
|
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||||
|
"CjNnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfbGl0ZV9pbXBvcnRzX25vbmxp" + |
||||||
|
"dGUucHJvdG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYv" + |
||||||
|
"Y3NoYXJwX29wdGlvbnMucHJvdG8aHmdvb2dsZS9wcm90b2J1Zi91bml0dGVz" + |
||||||
|
"dC5wcm90byJKChZUZXN0TGl0ZUltcG9ydHNOb25saXRlEjAKB21lc3NhZ2UY" + |
||||||
|
"ASABKAsyHy5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXNCTEgDwj5H" + |
||||||
|
"CiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSIlVuaXRUZXN0" + |
||||||
|
"TGl0ZUltcG9ydE5vbkxpdGVQcm90b0ZpbGU="); |
||||||
|
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||||
|
descriptor = root; |
||||||
|
internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor = Descriptor.MessageTypes[0]; |
||||||
|
internal__static_protobuf_unittest_TestLiteImportsNonlite__FieldAccessorTable = |
||||||
|
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite, global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.Builder>(internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor, |
||||||
|
new string[] { "Message", }); |
||||||
|
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||||
|
RegisterAllExtensions(registry); |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); |
||||||
|
global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RegisterAllExtensions(registry); |
||||||
|
return registry; |
||||||
|
}; |
||||||
|
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||||
|
new pbd::FileDescriptor[] { |
||||||
|
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, |
||||||
|
global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, |
||||||
|
}, assigner); |
||||||
|
} |
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
||||||
|
#region Messages |
||||||
|
public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessage<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> { |
||||||
|
private static readonly TestLiteImportsNonlite defaultInstance = new Builder().BuildPartial(); |
||||||
|
public static TestLiteImportsNonlite DefaultInstance { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override TestLiteImportsNonlite ThisMessage { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
|
||||||
|
public static pbd::MessageDescriptor Descriptor { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override pb::FieldAccess.FieldAccessorTable<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> InternalFieldAccessors { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.internal__static_protobuf_unittest_TestLiteImportsNonlite__FieldAccessorTable; } |
||||||
|
} |
||||||
|
|
||||||
|
public const int MessageFieldNumber = 1; |
||||||
|
private bool hasMessage; |
||||||
|
private global::Google.ProtocolBuffers.TestProtos.TestAllTypes message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; |
||||||
|
public bool HasMessage { |
||||||
|
get { return hasMessage; } |
||||||
|
} |
||||||
|
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { |
||||||
|
get { return message_; } |
||||||
|
} |
||||||
|
|
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(byte[] data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
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(TestLiteImportsNonlite prototype) { |
||||||
|
return (Builder) new Builder().MergeFrom(prototype); |
||||||
|
} |
||||||
|
|
||||||
|
public sealed partial class Builder : pb::GeneratedBuilder<TestLiteImportsNonlite, Builder> { |
||||||
|
protected override Builder ThisBuilder { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
public Builder() {} |
||||||
|
|
||||||
|
TestLiteImportsNonlite result = new TestLiteImportsNonlite(); |
||||||
|
|
||||||
|
protected override TestLiteImportsNonlite MessageBeingBuilt { |
||||||
|
get { return result; } |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clear() { |
||||||
|
result = new TestLiteImportsNonlite(); |
||||||
|
return this; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clone() { |
||||||
|
return new Builder().MergeFrom(result); |
||||||
|
} |
||||||
|
|
||||||
|
public override pbd::MessageDescriptor DescriptorForType { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||||
|
get { return global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestLiteImportsNonlite BuildPartial() { |
||||||
|
if (result == null) { |
||||||
|
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||||
|
} |
||||||
|
TestLiteImportsNonlite returnMe = result; |
||||||
|
result = null; |
||||||
|
return returnMe; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public bool HasMessage { |
||||||
|
get { return result.HasMessage; } |
||||||
|
} |
||||||
|
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { |
||||||
|
get { return result.Message; } |
||||||
|
set { SetMessage(value); } |
||||||
|
} |
||||||
|
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { |
||||||
|
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||||
|
result.hasMessage = true; |
||||||
|
result.message_ = value; |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) { |
||||||
|
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||||
|
result.hasMessage = true; |
||||||
|
result.message_ = builderForValue.Build(); |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder MergeMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { |
||||||
|
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||||
|
if (result.HasMessage && |
||||||
|
result.message_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) { |
||||||
|
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.message_).MergeFrom(value).BuildPartial(); |
||||||
|
} else { |
||||||
|
result.message_ = value; |
||||||
|
} |
||||||
|
result.hasMessage = true; |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder ClearMessage() { |
||||||
|
result.hasMessage = false; |
||||||
|
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
||||||
|
static TestLiteImportsNonlite() { |
||||||
|
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.Descriptor, null); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,292 @@ |
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||||
|
|
||||||
|
using pb = global::Google.ProtocolBuffers; |
||||||
|
using pbc = global::Google.ProtocolBuffers.Collections; |
||||||
|
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||||
|
using scg = global::System.Collections.Generic; |
||||||
|
namespace protobuf_unittest { |
||||||
|
|
||||||
|
public static partial class UnittestLiteImportsNonlite { |
||||||
|
|
||||||
|
#region Extension registration |
||||||
|
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||||
|
} |
||||||
|
#endregion |
||||||
|
#region Static variables |
||||||
|
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor; |
||||||
|
internal static pb::FieldAccess.FieldAccessorTable<global::protobuf_unittest.TestLiteImportsNonlite, global::protobuf_unittest.TestLiteImportsNonlite.Builder> internal__static_protobuf_unittest_TestLiteImportsNonlite__FieldAccessorTable; |
||||||
|
#endregion |
||||||
|
#region Descriptor |
||||||
|
public static pbd::FileDescriptor Descriptor { |
||||||
|
get { return descriptor; } |
||||||
|
} |
||||||
|
private static pbd::FileDescriptor descriptor; |
||||||
|
|
||||||
|
static UnittestLiteImportsNonlite() { |
||||||
|
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||||
|
"CjNnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfbGl0ZV9pbXBvcnRzX25vbmxp" + |
||||||
|
"dGUucHJvdG8SEXByb3RvYnVmX3VuaXR0ZXN0Gh5nb29nbGUvcHJvdG9idWYv" + |
||||||
|
"dW5pdHRlc3QucHJvdG8iSgoWVGVzdExpdGVJbXBvcnRzTm9ubGl0ZRIwCgdt" + |
||||||
|
"ZXNzYWdlGAEgASgLMh8ucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVz" + |
||||||
|
"QgJIAw=="); |
||||||
|
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||||
|
descriptor = root; |
||||||
|
internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor = Descriptor.MessageTypes[0]; |
||||||
|
internal__static_protobuf_unittest_TestLiteImportsNonlite__FieldAccessorTable = |
||||||
|
new pb::FieldAccess.FieldAccessorTable<global::protobuf_unittest.TestLiteImportsNonlite, global::protobuf_unittest.TestLiteImportsNonlite.Builder>(internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor, |
||||||
|
new string[] { "Message", }); |
||||||
|
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||||
|
RegisterAllExtensions(registry); |
||||||
|
global::protobuf_unittest.Unittest.RegisterAllExtensions(registry); |
||||||
|
return registry; |
||||||
|
}; |
||||||
|
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||||
|
new pbd::FileDescriptor[] { |
||||||
|
global::protobuf_unittest.Unittest.Descriptor, |
||||||
|
}, assigner); |
||||||
|
} |
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
||||||
|
#region Messages |
||||||
|
public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessage<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> { |
||||||
|
private static readonly TestLiteImportsNonlite defaultInstance = new Builder().BuildPartial(); |
||||||
|
public static TestLiteImportsNonlite DefaultInstance { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||||
|
get { return defaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override TestLiteImportsNonlite ThisMessage { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
|
||||||
|
public static pbd::MessageDescriptor Descriptor { |
||||||
|
get { return global::protobuf_unittest.UnittestLiteImportsNonlite.internal__static_protobuf_unittest_TestLiteImportsNonlite__Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
protected override pb::FieldAccess.FieldAccessorTable<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> InternalFieldAccessors { |
||||||
|
get { return global::protobuf_unittest.UnittestLiteImportsNonlite.internal__static_protobuf_unittest_TestLiteImportsNonlite__FieldAccessorTable; } |
||||||
|
} |
||||||
|
|
||||||
|
public const int MessageFieldNumber = 1; |
||||||
|
private bool hasMessage; |
||||||
|
private global::protobuf_unittest.TestAllTypes message_ = global::protobuf_unittest.TestAllTypes.DefaultInstance; |
||||||
|
public bool HasMessage { |
||||||
|
get { return hasMessage; } |
||||||
|
} |
||||||
|
public global::protobuf_unittest.TestAllTypes Message { |
||||||
|
get { return message_; } |
||||||
|
} |
||||||
|
|
||||||
|
public override bool IsInitialized { |
||||||
|
get { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public override void WriteTo(pb::CodedOutputStream output) { |
||||||
|
int size = SerializedSize; |
||||||
|
if (HasMessage) { |
||||||
|
output.WriteMessage(1, Message); |
||||||
|
} |
||||||
|
UnknownFields.WriteTo(output); |
||||||
|
} |
||||||
|
|
||||||
|
private int memoizedSerializedSize = -1; |
||||||
|
public override int SerializedSize { |
||||||
|
get { |
||||||
|
int size = memoizedSerializedSize; |
||||||
|
if (size != -1) return size; |
||||||
|
|
||||||
|
size = 0; |
||||||
|
if (HasMessage) { |
||||||
|
size += pb::CodedOutputStream.ComputeMessageSize(1, Message); |
||||||
|
} |
||||||
|
size += UnknownFields.SerializedSize; |
||||||
|
memoizedSerializedSize = size; |
||||||
|
return size; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(byte[] data) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||||
|
} |
||||||
|
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||||
|
} |
||||||
|
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(TestLiteImportsNonlite prototype) { |
||||||
|
return (Builder) new Builder().MergeFrom(prototype); |
||||||
|
} |
||||||
|
|
||||||
|
public sealed partial class Builder : pb::GeneratedBuilder<TestLiteImportsNonlite, Builder> { |
||||||
|
protected override Builder ThisBuilder { |
||||||
|
get { return this; } |
||||||
|
} |
||||||
|
public Builder() {} |
||||||
|
|
||||||
|
TestLiteImportsNonlite result = new TestLiteImportsNonlite(); |
||||||
|
|
||||||
|
protected override TestLiteImportsNonlite MessageBeingBuilt { |
||||||
|
get { return result; } |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clear() { |
||||||
|
result = new TestLiteImportsNonlite(); |
||||||
|
return this; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder Clone() { |
||||||
|
return new Builder().MergeFrom(result); |
||||||
|
} |
||||||
|
|
||||||
|
public override pbd::MessageDescriptor DescriptorForType { |
||||||
|
get { return global::protobuf_unittest.TestLiteImportsNonlite.Descriptor; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||||
|
get { return global::protobuf_unittest.TestLiteImportsNonlite.DefaultInstance; } |
||||||
|
} |
||||||
|
|
||||||
|
public override TestLiteImportsNonlite BuildPartial() { |
||||||
|
if (result == null) { |
||||||
|
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||||
|
} |
||||||
|
TestLiteImportsNonlite returnMe = result; |
||||||
|
result = null; |
||||||
|
return returnMe; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(pb::IMessage other) { |
||||||
|
if (other is TestLiteImportsNonlite) { |
||||||
|
return MergeFrom((TestLiteImportsNonlite) other); |
||||||
|
} else { |
||||||
|
base.MergeFrom(other); |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(TestLiteImportsNonlite other) { |
||||||
|
if (other == global::protobuf_unittest.TestLiteImportsNonlite.DefaultInstance) return this; |
||||||
|
if (other.HasMessage) { |
||||||
|
MergeMessage(other.Message); |
||||||
|
} |
||||||
|
this.MergeUnknownFields(other.UnknownFields); |
||||||
|
return this; |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(pb::CodedInputStream input) { |
||||||
|
return MergeFrom(input, pb::ExtensionRegistry.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { |
||||||
|
pb::UnknownFieldSet.Builder unknownFields = null; |
||||||
|
while (true) { |
||||||
|
uint tag = input.ReadTag(); |
||||||
|
switch (tag) { |
||||||
|
case 0: { |
||||||
|
if (unknownFields != null) { |
||||||
|
this.UnknownFields = unknownFields.Build(); |
||||||
|
} |
||||||
|
return this; |
||||||
|
} |
||||||
|
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); |
||||||
|
break; |
||||||
|
} |
||||||
|
case 10: { |
||||||
|
global::protobuf_unittest.TestAllTypes.Builder subBuilder = global::protobuf_unittest.TestAllTypes.CreateBuilder(); |
||||||
|
if (HasMessage) { |
||||||
|
subBuilder.MergeFrom(Message); |
||||||
|
} |
||||||
|
input.ReadMessage(subBuilder, extensionRegistry); |
||||||
|
Message = subBuilder.BuildPartial(); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public bool HasMessage { |
||||||
|
get { return result.HasMessage; } |
||||||
|
} |
||||||
|
public global::protobuf_unittest.TestAllTypes Message { |
||||||
|
get { return result.Message; } |
||||||
|
set { SetMessage(value); } |
||||||
|
} |
||||||
|
public Builder SetMessage(global::protobuf_unittest.TestAllTypes value) { |
||||||
|
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||||
|
result.hasMessage = true; |
||||||
|
result.message_ = value; |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder SetMessage(global::protobuf_unittest.TestAllTypes.Builder builderForValue) { |
||||||
|
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||||
|
result.hasMessage = true; |
||||||
|
result.message_ = builderForValue.Build(); |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder MergeMessage(global::protobuf_unittest.TestAllTypes value) { |
||||||
|
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||||
|
if (result.HasMessage && |
||||||
|
result.message_ != global::protobuf_unittest.TestAllTypes.DefaultInstance) { |
||||||
|
result.message_ = global::protobuf_unittest.TestAllTypes.CreateBuilder(result.message_).MergeFrom(value).BuildPartial(); |
||||||
|
} else { |
||||||
|
result.message_ = value; |
||||||
|
} |
||||||
|
result.hasMessage = true; |
||||||
|
return this; |
||||||
|
} |
||||||
|
public Builder ClearMessage() { |
||||||
|
result.hasMessage = false; |
||||||
|
result.message_ = global::protobuf_unittest.TestAllTypes.DefaultInstance; |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
||||||
|
static TestLiteImportsNonlite() { |
||||||
|
object.ReferenceEquals(global::protobuf_unittest.UnittestLiteImportsNonlite.Descriptor, null); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#endregion |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue