Commit 64bfac28 authored by csharptest's avatar csharptest

Integrated latest protoc.exe (2.3) and added/updated test protos

parent 16015a96
......@@ -6,6 +6,8 @@ src/ProtocolBuffers/bin/
src/ProtocolBuffers/obj/
src/ProtocolBuffers.Test/bin/
src/ProtocolBuffers.Test/obj/
src/ProtocolBuffersLite.Test/bin/
src/ProtocolBuffersLite.Test/obj/
src/ProtoBench/bin/
src/ProtoBench/obj/
src/ProtoDump/bin/
......
......@@ -143,6 +143,14 @@
<arg file="${protos-dir}/google/protobuf/unittest_import.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_mset.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_optimize_for.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_empty.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_enormous_descriptor.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_import_lite.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_lite.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_lite_imports_nonlite.proto" />
<arg file="${protos-dir}/google/protobuf/unittest_no_generic_services.proto" />
<arg file="${protos-dir}/tutorial/addressbook.proto" />
</exec>
......@@ -154,6 +162,7 @@
<target name="copy-generated-source"
description="Copies generated source from temporary directory to source tree. Use with care!">
<copy todir="${src}/ProtocolBuffers/DescriptorProtos">
<fileset basedir="${tmp-dir}">
<include name="DescriptorProtoFile.cs" />
......@@ -163,22 +172,34 @@
<copy todir="${src}/ProtocolBuffers.Test/TestProtos">
<fileset basedir="${tmp-dir}">
<include name="UnitTestProtoFile.cs" />
<include name="UnitTestCSharpOptionsProtoFile.cs" />
<include name="UnitTestCustomOptionsProtoFile.cs" />
<include name="UnitTestEmbedOptimizeForProtoFile.cs" />
<include name="UnitTestEmptyProtoFile.cs" />
<include name="UnitTestEnormousDescriptorProtoFile.cs" />
<include name="UnitTestImportLiteProtoFile.cs" />
<include name="UnitTestImportProtoFile.cs" />
<include name="UnitTestMessageSetProtoFile.cs" />
<include name="UnitTestNoGenericServicesProtoFile.cs" />
<include name="UnitTestOptimizeForProtoFile.cs" />
<include name="UnitTestProtoFile.cs" />
</fileset>
</copy>
<copy todir="${src}/ProtocolBuffersLite.Test/TestProtos">
<fileset basedir="${tmp-dir}">
<include name="UnitTestLiteImportNonLiteProtoFile.cs" />
<include name="UnitTestLiteProtoFile.cs" />
</fileset>
</copy>
<copy todir="${src}/AddressBook">
<fileset basedir="${tmp-dir}">
<include name="AddressBookProtos.cs" />
</fileset>
</copy>
</target>
</target>
<target name="build"
description="Builds all C# code">
......
No preview for this file type
......@@ -247,13 +247,31 @@ message FileOptions {
// Generated classes can be optimized for speed or code size.
enum OptimizeMode {
SPEED = 1; // Generate complete code for parsing, serialization, etc.
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
SPEED = 1; // Generate complete code for parsing, serialization,
// etc.
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
}
optional OptimizeMode optimize_for = 9 [default=SPEED];
// Should generic services be generated in each language? "Generic" services
// are not specific to any particular RPC system. They are generated by the
// main code generators in each language (without additional plugins).
// Generic services were the only kind of service generation supported by
// early versions of proto2.
//
// Generic services are now considered deprecated in favor of using plugins
// that generate code specific to your particular RPC system. If you are
// using such a plugin, set these to false. In the future, we may change
// the default to false, so if you explicitly want generic services, you
// should explicitly set these to true.
optional bool cc_generic_services = 16 [default=true];
optional bool java_generic_services = 17 [default=true];
optional bool py_generic_services = 18 [default=true];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
......@@ -282,6 +300,11 @@ message MessageOptions {
// the protocol compiler.
optional bool message_set_wire_format = 1 [default=false];
// Disables the generation of the standard "descriptor()" accessor, which can
// conflict with a field of the same name. This is meant to make migration
// from proto1 easier; new code should avoid fields named "descriptor".
optional bool no_standard_descriptor_accessor = 2 [default=false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
......@@ -294,8 +317,11 @@ message FieldOptions {
// representation of the field than it normally would. See the specific
// options below. This option is not yet implemented in the open source
// release -- sorry, we'll try to include it in a future version!
optional CType ctype = 1;
optional CType ctype = 1 [default = STRING];
enum CType {
// Default mode.
STRING = 0;
CORD = 1;
STRING_PIECE = 2;
......@@ -306,12 +332,13 @@ message FieldOptions {
// a single length-delimited blob.
optional bool packed = 2;
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields.
optional bool deprecated = 3 [default=false];
// EXPERIMENTAL. DO NOT USE.
// For "map" fields, the name of the field in the enclosed type that
// is the key for this map. For example, suppose we have:
......@@ -334,6 +361,7 @@ message FieldOptions {
}
message EnumOptions {
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
......
......@@ -161,6 +161,10 @@ message TestAllTypes {
optional string default_cord = 85 [ctype=CORD,default="123"];
}
message TestDeprecatedFields {
optional int32 deprecated_int32 = 1 [deprecated=true];
}
// Define these after TestAllTypes to make sure the compiler can handle
// that.
message ForeignMessage {
......@@ -275,6 +279,14 @@ extend TestAllExtensions {
optional string default_cord_extension = 85 [ctype=CORD, default="123"];
}
message TestNestedExtension {
extend TestAllExtensions {
// Check for bug where string extensions declared in tested scope did not
// compile.
optional string test = 1002 [default="test"];
}
}
// We have separate messages for testing required fields because it's
// annoying to have to fill in required fields in TestProto in order to
// do anything with it. Note that we don't need to test every type of
......@@ -346,6 +358,12 @@ message TestEmptyMessageWithExtensions {
extensions 1 to max;
}
message TestMultipleExtensionRanges {
extensions 42;
extensions 4143 to 4243;
extensions 65536 to max;
}
// Test that really large tag numbers don't break anything.
message TestReallyLargeTagNumber {
// The largest possible tag number is 2^28 - 1, since the wire format uses
......@@ -370,13 +388,14 @@ message TestMutualRecursionB {
}
// Test that groups have disjoint field numbers from their siblings and
// parents. This is NOT possible in proto1; only proto2. When outputting
// proto1, the dup fields should be dropped.
message TestDupFieldNumber {
optional int32 a = 1;
optional group Foo = 2 { optional int32 a = 1; }
optional group Bar = 3 { optional int32 a = 1; }
}
// parents. This is NOT possible in proto1; only proto2. When attempting
// to compile with proto1, this will emit an error; so we only include it
// in protobuf_unittest_proto.
message TestDupFieldNumber { // NO_PROTO1
optional int32 a = 1; // NO_PROTO1
optional group Foo = 2 { optional int32 a = 1; } // NO_PROTO1
optional group Bar = 3 { optional int32 a = 1; } // NO_PROTO1
} // NO_PROTO1
// Needed for a Python test.
......@@ -456,8 +475,37 @@ message TestExtremeDefaultValues {
// the UTF-8 text directly into this text file rather than escape it, but
// lots of people use editors that would be confused by this.)
optional string utf8_string = 6 [default = "\341\210\264"];
// Tests for single-precision floating-point values.
optional float zero_float = 7 [default = 0];
optional float one_float = 8 [default = 1];
optional float small_float = 9 [default = 1.5];
optional float negative_one_float = 10 [default = -1];
optional float negative_float = 11 [default = -1.5];
// Using exponents
optional float large_float = 12 [default = 2E8];
optional float small_negative_float = 13 [default = -8e-28];
// Text for nonfinite floating-point values.
optional double inf_double = 14 [default = inf];
optional double neg_inf_double = 15 [default = -inf];
optional double nan_double = 16 [default = nan];
optional float inf_float = 17 [default = inf];
optional float neg_inf_float = 18 [default = -inf];
optional float nan_float = 19 [default = nan];
}
// Test String and Bytes: string is for valid UTF-8 strings
message OneString {
optional string data = 1;
}
message OneBytes {
optional bytes data = 1;
}
// Test messages for packed fields
message TestPackedTypes {
repeated int32 packed_int32 = 90 [packed = true];
repeated int64 packed_int64 = 91 [packed = true];
......@@ -475,6 +523,25 @@ message TestPackedTypes {
repeated ForeignEnum packed_enum = 103 [packed = true];
}
// A message with the same fields as TestPackedTypes, but without packing. Used
// to test packed <-> unpacked wire compatibility.
message TestUnpackedTypes {
repeated int32 unpacked_int32 = 90 [packed = false];
repeated int64 unpacked_int64 = 91 [packed = false];
repeated uint32 unpacked_uint32 = 92 [packed = false];
repeated uint64 unpacked_uint64 = 93 [packed = false];
repeated sint32 unpacked_sint32 = 94 [packed = false];
repeated sint64 unpacked_sint64 = 95 [packed = false];
repeated fixed32 unpacked_fixed32 = 96 [packed = false];
repeated fixed64 unpacked_fixed64 = 97 [packed = false];
repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
repeated float unpacked_float = 100 [packed = false];
repeated double unpacked_double = 101 [packed = false];
repeated bool unpacked_bool = 102 [packed = false];
repeated ForeignEnum unpacked_enum = 103 [packed = false];
}
message TestPackedExtensions {
extensions 1 to max;
}
......@@ -496,6 +563,47 @@ extend TestPackedExtensions {
repeated ForeignEnum packed_enum_extension = 103 [packed = true];
}
// Used by ExtensionSetTest/DynamicExtensions. The test actually builds
// a set of extensions to TestAllExtensions dynamically, based on the fields
// of this message type.
message TestDynamicExtensions {
enum DynamicEnumType {
DYNAMIC_FOO = 2200;
DYNAMIC_BAR = 2201;
DYNAMIC_BAZ = 2202;
}
message DynamicMessageType {
optional int32 dynamic_field = 2100;
}
optional fixed32 scalar_extension = 2000;
optional ForeignEnum enum_extension = 2001;
optional DynamicEnumType dynamic_enum_extension = 2002;
optional ForeignMessage message_extension = 2003;
optional DynamicMessageType dynamic_message_extension = 2004;
repeated string repeated_extension = 2005;
repeated sint32 packed_extension = 2006 [packed = true];
}
message TestRepeatedScalarDifferentTagSizes {
// Parsing repeated fixed size values used to fail. This message needs to be
// used in order to get a tag of the right size; all of the repeated fields
// in TestAllTypes didn't trigger the check.
repeated fixed32 repeated_fixed32 = 12;
// Check for a varint type, just for good measure.
repeated int32 repeated_int32 = 13;
// These have two-byte tags.
repeated fixed64 repeated_fixed64 = 2046;
repeated int64 repeated_int64 = 2047;
// Three byte tags.
repeated float repeated_float = 262142;
repeated uint64 repeated_uint64 = 262143;
}
// Test that RPC services work.
message FooRequest {}
message FooResponse {}
......
......@@ -72,7 +72,9 @@ extend google.protobuf.EnumOptions {
optional sfixed32 enum_opt1 = 7753576;
}
// TODO(benjy): Test options on enum values when the parser supports them.
extend google.protobuf.EnumValueOptions {
optional int32 enum_value_opt1 = 1560678;
}
extend google.protobuf.ServiceOptions {
optional sint64 service_opt1 = 7887650;
......@@ -101,7 +103,7 @@ message TestMessageWithCustomOptions {
option (enum_opt1) = -789;
ANENUM_VAL1 = 1;
ANENUM_VAL2 = 2;
ANENUM_VAL2 = 2 [(enum_value_opt1) = 123];
}
}
......@@ -208,6 +210,8 @@ message SettingRealsFromNegativeInts {
message ComplexOptionType1 {
optional int32 foo = 1;
optional int32 foo2 = 2;
optional int32 foo3 = 3;
extensions 100 to max;
}
......
// 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.)
This source diff could not be displayed because it is too large. You can view the blob instead.
// 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;
}
This diff is collapsed.
// 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;
}
// 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);
}
......@@ -72,11 +72,16 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReflectionTester.cs" />
<Compile Include="ServiceTest.cs" />
<Compile Include="TestProtos\FIXUP.cs" />
<Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
<Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
<Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
<Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
<Compile Include="TestProtos\UnitTestEnormousDescriptorProtoFile.cs" />
<Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
<Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
<Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
<Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
<Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
<Compile Include="TestProtos\UnitTestProtoFile.cs" />
<Compile Include="TestUtil.cs" />
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Google.ProtocolBuffers.TestProtos {
public sealed partial class TestExtremeDefaultValues {
//These values are not currently handled by the generator...
const double InfinityD = double.PositiveInfinity;
const double NaND = double.NaN;
const float InfinityF = float.PositiveInfinity;
const float NaNF = float.NaN;
}
}
// 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
}
}
// 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
}
......@@ -28,6 +28,25 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite", "ProtocolBuffers\ProtocolBuffersLite.csproj", "{6969BDCE-D925-43F3-94AC-A531E6DF2591}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite.Test", "ProtocolBuffersLite.Test\ProtocolBuffersLite.Test.csproj", "{EE01ED24-3750-4567-9A23-1DB676A15610}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8D3015A-EA39-4F03-AEEC-3FF1F2087A12}"
ProjectSection(SolutionItems) = preProject
..\protos\google\protobuf\unittest.proto = ..\protos\google\protobuf\unittest.proto
..\protos\google\protobuf\unittest_csharp_options.proto = ..\protos\google\protobuf\unittest_csharp_options.proto
..\protos\google\protobuf\unittest_custom_options.proto = ..\protos\google\protobuf\unittest_custom_options.proto
..\protos\google\protobuf\unittest_embed_optimize_for.proto = ..\protos\google\protobuf\unittest_embed_optimize_for.proto
..\protos\google\protobuf\unittest_empty.proto = ..\protos\google\protobuf\unittest_empty.proto
..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.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\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
..\protos\google\protobuf\unittest_no_generic_services.proto = ..\protos\google\protobuf\unittest_no_generic_services.proto
..\protos\google\protobuf\unittest_optimize_for.proto = ..\protos\google\protobuf\unittest_optimize_for.proto
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -89,8 +108,17 @@ Global
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Silverlight2|Any CPU.ActiveCfg = Silverlight2|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Silverlight2|Any CPU.Build.0 = Silverlight2|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Silverlight2|Any CPU.ActiveCfg = Silverlight2|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Silverlight2|Any CPU.Build.0 = Silverlight2|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C8D3015A-EA39-4F03-AEEC-3FF1F2087A12} = {1F896D5C-5FC2-4671-9216-781CB8187EC7}
EndGlobalSection
EndGlobal
......@@ -74,6 +74,12 @@ using System.Runtime.CompilerServices;
"72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78"+
"0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce"+
"ad5cedbf")]
[assembly: InternalsVisibleTo("Google.ProtocolBuffersLite.Test,PublicKey=" +
"00240000048000009400000006020000002400005253413100040000010001008179f2dd31a648" +
"2a2359dbe33e53701167a888e7c369a9ae3210b64f93861d8a7d286447e58bc167e3d99483beda" +
"72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78" +
"0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce" +
"ad5cedbf")]
[assembly: InternalsVisibleTo("ProtoGen,PublicKey=" +
"00240000048000009400000006020000002400005253413100040000010001006d739020e13bdc" +
"038e86fa8aa5e1b13aae65d3ae79d622816c6067ab5b6955be50cc887130117582349208c13a55" +
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\ProtocolBuffers.Test\Properties\Google.ProtocolBuffers.Test.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight2|AnyCPU' ">
<OutputPath>bin\Silverlight2\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Rhino.Mocks, Version=3.5.0.2, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Rhino.Mocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<None Include="TestProtos\UnittestLite.cs" />
<None Include="TestProtos\UnittestLiteImportsNonlite.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\ProtocolBuffers.Test\Properties\Google.ProtocolBuffers.Test.snk">
<Link>Properties\Google.ProtocolBuffers.Test.snk</Link>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.csproj">
<Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
<Name>ProtocolBuffersLite</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
// 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
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment