diff options
author | Jisi Liu <liujisi@google.com> | 2017-12-19 17:45:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 17:45:56 -0800 |
commit | d106399d39a3a5719f1e3d8b5997a4437eb83af3 (patch) | |
tree | 0b247a1d9a5fb782e432f1a17bb8eb90a4bdf24f /csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs | |
parent | 6c3c7f6d5d68433af01c5ca500978c2d69f15212 (diff) | |
parent | b308580bb1c3f87a062ac1448a3e0bdaab9d40cf (diff) | |
download | protobuf-d106399d39a3a5719f1e3d8b5997a4437eb83af3.tar.gz protobuf-d106399d39a3a5719f1e3d8b5997a4437eb83af3.tar.bz2 protobuf-d106399d39a3a5719f1e3d8b5997a4437eb83af3.zip |
Merge pull request #4072 from google/jieluo
Cherrypick for csharp, including:
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs | 342 |
1 files changed, 298 insertions, 44 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs index e21ede9c..6d02bda6 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: unittest_custom_options_proto3.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: unittest_custom_options_proto3.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -183,6 +185,7 @@ namespace UnitTest.Issues.TestProtos { /// </summary> public sealed partial class TestMessageWithCustomOptions : pb::IMessage<TestMessageWithCustomOptions> { private static readonly pb::MessageParser<TestMessageWithCustomOptions> _parser = new pb::MessageParser<TestMessageWithCustomOptions>(() => new TestMessageWithCustomOptions()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<TestMessageWithCustomOptions> Parser { get { return _parser; } } @@ -212,6 +215,7 @@ namespace UnitTest.Issues.TestProtos { break; } + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -275,7 +279,7 @@ namespace UnitTest.Issues.TestProtos { if (Field1 != other.Field1) return false; if (OneofField != other.OneofField) return false; if (AnOneofCase != other.AnOneofCase) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -284,6 +288,9 @@ namespace UnitTest.Issues.TestProtos { if (Field1.Length != 0) hash ^= Field1.GetHashCode(); if (anOneofCase_ == AnOneofOneofCase.OneofField) hash ^= OneofField.GetHashCode(); hash ^= (int) anOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -302,6 +309,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteRawTag(16); output.WriteInt32(OneofField); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -313,6 +323,9 @@ namespace UnitTest.Issues.TestProtos { if (anOneofCase_ == AnOneofOneofCase.OneofField) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofField); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -330,6 +343,7 @@ namespace UnitTest.Issues.TestProtos { break; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -338,7 +352,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Field1 = input.ReadString(); @@ -373,6 +387,7 @@ namespace UnitTest.Issues.TestProtos { /// </summary> public sealed partial class CustomOptionFooRequest : pb::IMessage<CustomOptionFooRequest> { private static readonly pb::MessageParser<CustomOptionFooRequest> _parser = new pb::MessageParser<CustomOptionFooRequest>(() => new CustomOptionFooRequest()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionFooRequest> Parser { get { return _parser; } } @@ -395,6 +410,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionFooRequest(CustomOptionFooRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -415,12 +431,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -431,11 +450,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -444,6 +469,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -452,7 +478,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -462,6 +488,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class CustomOptionFooResponse : pb::IMessage<CustomOptionFooResponse> { private static readonly pb::MessageParser<CustomOptionFooResponse> _parser = new pb::MessageParser<CustomOptionFooResponse>(() => new CustomOptionFooResponse()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionFooResponse> Parser { get { return _parser; } } @@ -484,6 +511,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionFooResponse(CustomOptionFooResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -504,12 +532,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -520,11 +551,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -533,6 +570,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -541,7 +579,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -551,6 +589,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class CustomOptionFooClientMessage : pb::IMessage<CustomOptionFooClientMessage> { private static readonly pb::MessageParser<CustomOptionFooClientMessage> _parser = new pb::MessageParser<CustomOptionFooClientMessage>(() => new CustomOptionFooClientMessage()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionFooClientMessage> Parser { get { return _parser; } } @@ -573,6 +612,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionFooClientMessage(CustomOptionFooClientMessage other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -593,12 +633,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -609,11 +652,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -622,6 +671,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -630,7 +680,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -640,6 +690,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class CustomOptionFooServerMessage : pb::IMessage<CustomOptionFooServerMessage> { private static readonly pb::MessageParser<CustomOptionFooServerMessage> _parser = new pb::MessageParser<CustomOptionFooServerMessage>(() => new CustomOptionFooServerMessage()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionFooServerMessage> Parser { get { return _parser; } } @@ -662,6 +713,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionFooServerMessage(CustomOptionFooServerMessage other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -682,12 +734,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -698,11 +753,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -711,6 +772,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -719,7 +781,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -729,6 +791,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class DummyMessageContainingEnum : pb::IMessage<DummyMessageContainingEnum> { private static readonly pb::MessageParser<DummyMessageContainingEnum> _parser = new pb::MessageParser<DummyMessageContainingEnum>(() => new DummyMessageContainingEnum()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<DummyMessageContainingEnum> Parser { get { return _parser; } } @@ -751,6 +814,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public DummyMessageContainingEnum(DummyMessageContainingEnum other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -771,12 +835,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -787,11 +854,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -800,6 +873,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -808,7 +882,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -831,6 +905,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class DummyMessageInvalidAsOptionType : pb::IMessage<DummyMessageInvalidAsOptionType> { private static readonly pb::MessageParser<DummyMessageInvalidAsOptionType> _parser = new pb::MessageParser<DummyMessageInvalidAsOptionType>(() => new DummyMessageInvalidAsOptionType()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<DummyMessageInvalidAsOptionType> Parser { get { return _parser; } } @@ -853,6 +928,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public DummyMessageInvalidAsOptionType(DummyMessageInvalidAsOptionType other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -873,12 +949,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -889,11 +968,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -902,6 +987,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -910,7 +996,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -920,6 +1006,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class CustomOptionMinIntegerValues : pb::IMessage<CustomOptionMinIntegerValues> { private static readonly pb::MessageParser<CustomOptionMinIntegerValues> _parser = new pb::MessageParser<CustomOptionMinIntegerValues>(() => new CustomOptionMinIntegerValues()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionMinIntegerValues> Parser { get { return _parser; } } @@ -942,6 +1029,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionMinIntegerValues(CustomOptionMinIntegerValues other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -962,12 +1050,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -978,11 +1069,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -991,6 +1088,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -999,7 +1097,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -1009,6 +1107,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class CustomOptionMaxIntegerValues : pb::IMessage<CustomOptionMaxIntegerValues> { private static readonly pb::MessageParser<CustomOptionMaxIntegerValues> _parser = new pb::MessageParser<CustomOptionMaxIntegerValues>(() => new CustomOptionMaxIntegerValues()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionMaxIntegerValues> Parser { get { return _parser; } } @@ -1031,6 +1130,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionMaxIntegerValues(CustomOptionMaxIntegerValues other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1051,12 +1151,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1067,11 +1170,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1080,6 +1189,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1088,7 +1198,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -1098,6 +1208,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class CustomOptionOtherValues : pb::IMessage<CustomOptionOtherValues> { private static readonly pb::MessageParser<CustomOptionOtherValues> _parser = new pb::MessageParser<CustomOptionOtherValues>(() => new CustomOptionOtherValues()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<CustomOptionOtherValues> Parser { get { return _parser; } } @@ -1120,6 +1231,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public CustomOptionOtherValues(CustomOptionOtherValues other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1140,12 +1252,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1156,11 +1271,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1169,6 +1290,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1177,7 +1299,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -1187,6 +1309,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class SettingRealsFromPositiveInts : pb::IMessage<SettingRealsFromPositiveInts> { private static readonly pb::MessageParser<SettingRealsFromPositiveInts> _parser = new pb::MessageParser<SettingRealsFromPositiveInts>(() => new SettingRealsFromPositiveInts()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<SettingRealsFromPositiveInts> Parser { get { return _parser; } } @@ -1209,6 +1332,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public SettingRealsFromPositiveInts(SettingRealsFromPositiveInts other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1229,12 +1353,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1245,11 +1372,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1258,6 +1391,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1266,7 +1400,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -1276,6 +1410,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class SettingRealsFromNegativeInts : pb::IMessage<SettingRealsFromNegativeInts> { private static readonly pb::MessageParser<SettingRealsFromNegativeInts> _parser = new pb::MessageParser<SettingRealsFromNegativeInts>(() => new SettingRealsFromNegativeInts()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<SettingRealsFromNegativeInts> Parser { get { return _parser; } } @@ -1298,6 +1433,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public SettingRealsFromNegativeInts(SettingRealsFromNegativeInts other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1318,12 +1454,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1334,11 +1473,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1347,6 +1492,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1355,7 +1501,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -1365,6 +1511,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class ComplexOptionType1 : pb::IMessage<ComplexOptionType1> { private static readonly pb::MessageParser<ComplexOptionType1> _parser = new pb::MessageParser<ComplexOptionType1>(() => new ComplexOptionType1()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<ComplexOptionType1> Parser { get { return _parser; } } @@ -1391,6 +1538,7 @@ namespace UnitTest.Issues.TestProtos { foo2_ = other.foo2_; foo3_ = other.foo3_; foo4_ = other.foo4_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1458,7 +1606,7 @@ namespace UnitTest.Issues.TestProtos { if (Foo2 != other.Foo2) return false; if (Foo3 != other.Foo3) return false; if(!foo4_.Equals(other.foo4_)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1468,6 +1616,9 @@ namespace UnitTest.Issues.TestProtos { if (Foo2 != 0) hash ^= Foo2.GetHashCode(); if (Foo3 != 0) hash ^= Foo3.GetHashCode(); hash ^= foo4_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1491,6 +1642,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteInt32(Foo3); } foo4_.WriteTo(output, _repeated_foo4_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1506,6 +1660,9 @@ namespace UnitTest.Issues.TestProtos { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Foo3); } size += foo4_.CalculateSize(_repeated_foo4_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1524,6 +1681,7 @@ namespace UnitTest.Issues.TestProtos { Foo3 = other.Foo3; } foo4_.Add(other.foo4_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1532,7 +1690,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Foo = input.ReadInt32(); @@ -1559,6 +1717,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class ComplexOptionType2 : pb::IMessage<ComplexOptionType2> { private static readonly pb::MessageParser<ComplexOptionType2> _parser = new pb::MessageParser<ComplexOptionType2>(() => new ComplexOptionType2()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<ComplexOptionType2> Parser { get { return _parser; } } @@ -1585,6 +1744,7 @@ namespace UnitTest.Issues.TestProtos { baz_ = other.baz_; Fred = other.fred_ != null ? other.Fred.Clone() : null; barney_ = other.barney_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1652,7 +1812,7 @@ namespace UnitTest.Issues.TestProtos { if (Baz != other.Baz) return false; if (!object.Equals(Fred, other.Fred)) return false; if(!barney_.Equals(other.barney_)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1662,6 +1822,9 @@ namespace UnitTest.Issues.TestProtos { if (Baz != 0) hash ^= Baz.GetHashCode(); if (fred_ != null) hash ^= Fred.GetHashCode(); hash ^= barney_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1685,6 +1848,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteMessage(Fred); } barney_.WriteTo(output, _repeated_barney_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1700,6 +1866,9 @@ namespace UnitTest.Issues.TestProtos { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fred); } size += barney_.CalculateSize(_repeated_barney_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1724,6 +1893,7 @@ namespace UnitTest.Issues.TestProtos { Fred.MergeFrom(other.Fred); } barney_.Add(other.barney_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1732,7 +1902,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { if (bar_ == null) { @@ -1766,6 +1936,7 @@ namespace UnitTest.Issues.TestProtos { public static partial class Types { public sealed partial class ComplexOptionType4 : pb::IMessage<ComplexOptionType4> { private static readonly pb::MessageParser<ComplexOptionType4> _parser = new pb::MessageParser<ComplexOptionType4>(() => new ComplexOptionType4()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<ComplexOptionType4> Parser { get { return _parser; } } @@ -1789,6 +1960,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public ComplexOptionType4(ComplexOptionType4 other) : this() { waldo_ = other.waldo_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1821,13 +1993,16 @@ namespace UnitTest.Issues.TestProtos { return true; } if (Waldo != other.Waldo) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Waldo != 0) hash ^= Waldo.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1842,6 +2017,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteRawTag(8); output.WriteInt32(Waldo); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1850,6 +2028,9 @@ namespace UnitTest.Issues.TestProtos { if (Waldo != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Waldo); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1861,6 +2042,7 @@ namespace UnitTest.Issues.TestProtos { if (other.Waldo != 0) { Waldo = other.Waldo; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1869,7 +2051,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Waldo = input.ReadInt32(); @@ -1888,6 +2070,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class ComplexOptionType3 : pb::IMessage<ComplexOptionType3> { private static readonly pb::MessageParser<ComplexOptionType3> _parser = new pb::MessageParser<ComplexOptionType3>(() => new ComplexOptionType3()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<ComplexOptionType3> Parser { get { return _parser; } } @@ -1911,6 +2094,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public ComplexOptionType3(ComplexOptionType3 other) : this() { qux_ = other.qux_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1943,13 +2127,16 @@ namespace UnitTest.Issues.TestProtos { return true; } if (Qux != other.Qux) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Qux != 0) hash ^= Qux.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1964,6 +2151,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteRawTag(8); output.WriteInt32(Qux); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1972,6 +2162,9 @@ namespace UnitTest.Issues.TestProtos { if (Qux != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Qux); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1983,6 +2176,7 @@ namespace UnitTest.Issues.TestProtos { if (other.Qux != 0) { Qux = other.Qux; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1991,7 +2185,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Qux = input.ReadInt32(); @@ -2008,6 +2202,7 @@ namespace UnitTest.Issues.TestProtos { /// </summary> public sealed partial class VariousComplexOptions : pb::IMessage<VariousComplexOptions> { private static readonly pb::MessageParser<VariousComplexOptions> _parser = new pb::MessageParser<VariousComplexOptions>(() => new VariousComplexOptions()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<VariousComplexOptions> Parser { get { return _parser; } } @@ -2030,6 +2225,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public VariousComplexOptions(VariousComplexOptions other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2050,12 +2246,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -2066,11 +2265,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -2079,6 +2284,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2087,7 +2293,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -2100,6 +2306,7 @@ namespace UnitTest.Issues.TestProtos { /// </summary> public sealed partial class Aggregate : pb::IMessage<Aggregate> { private static readonly pb::MessageParser<Aggregate> _parser = new pb::MessageParser<Aggregate>(() => new Aggregate()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Aggregate> Parser { get { return _parser; } } @@ -2125,6 +2332,7 @@ namespace UnitTest.Issues.TestProtos { i_ = other.i_; s_ = other.s_; Sub = other.sub_ != null ? other.Sub.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2184,7 +2392,7 @@ namespace UnitTest.Issues.TestProtos { if (I != other.I) return false; if (S != other.S) return false; if (!object.Equals(Sub, other.Sub)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2193,6 +2401,9 @@ namespace UnitTest.Issues.TestProtos { if (I != 0) hash ^= I.GetHashCode(); if (S.Length != 0) hash ^= S.GetHashCode(); if (sub_ != null) hash ^= Sub.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -2215,6 +2426,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteRawTag(26); output.WriteMessage(Sub); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2229,6 +2443,9 @@ namespace UnitTest.Issues.TestProtos { if (sub_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Sub); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -2249,6 +2466,7 @@ namespace UnitTest.Issues.TestProtos { } Sub.MergeFrom(other.Sub); } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2257,7 +2475,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { I = input.ReadInt32(); @@ -2282,6 +2500,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class AggregateMessage : pb::IMessage<AggregateMessage> { private static readonly pb::MessageParser<AggregateMessage> _parser = new pb::MessageParser<AggregateMessage>(() => new AggregateMessage()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<AggregateMessage> Parser { get { return _parser; } } @@ -2305,6 +2524,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public AggregateMessage(AggregateMessage other) : this() { fieldname_ = other.fieldname_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2337,13 +2557,16 @@ namespace UnitTest.Issues.TestProtos { return true; } if (Fieldname != other.Fieldname) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Fieldname != 0) hash ^= Fieldname.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -2358,6 +2581,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteRawTag(8); output.WriteInt32(Fieldname); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2366,6 +2592,9 @@ namespace UnitTest.Issues.TestProtos { if (Fieldname != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Fieldname); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -2377,6 +2606,7 @@ namespace UnitTest.Issues.TestProtos { if (other.Fieldname != 0) { Fieldname = other.Fieldname; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2385,7 +2615,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Fieldname = input.ReadInt32(); @@ -2402,6 +2632,7 @@ namespace UnitTest.Issues.TestProtos { /// </summary> public sealed partial class NestedOptionType : pb::IMessage<NestedOptionType> { private static readonly pb::MessageParser<NestedOptionType> _parser = new pb::MessageParser<NestedOptionType>(() => new NestedOptionType()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<NestedOptionType> Parser { get { return _parser; } } @@ -2424,6 +2655,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public NestedOptionType(NestedOptionType other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2444,12 +2676,15 @@ namespace UnitTest.Issues.TestProtos { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -2460,11 +2695,17 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -2473,6 +2714,7 @@ namespace UnitTest.Issues.TestProtos { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2481,7 +2723,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } @@ -2498,6 +2740,7 @@ namespace UnitTest.Issues.TestProtos { public sealed partial class NestedMessage : pb::IMessage<NestedMessage> { private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } @@ -2521,6 +2764,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public NestedMessage(NestedMessage other) : this() { nestedField_ = other.nestedField_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2553,13 +2797,16 @@ namespace UnitTest.Issues.TestProtos { return true; } if (NestedField != other.NestedField) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (NestedField != 0) hash ^= NestedField.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -2574,6 +2821,9 @@ namespace UnitTest.Issues.TestProtos { output.WriteRawTag(8); output.WriteInt32(NestedField); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2582,6 +2832,9 @@ namespace UnitTest.Issues.TestProtos { if (NestedField != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(NestedField); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -2593,6 +2846,7 @@ namespace UnitTest.Issues.TestProtos { if (other.NestedField != 0) { NestedField = other.NestedField; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2601,7 +2855,7 @@ namespace UnitTest.Issues.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { NestedField = input.ReadInt32(); |