diff options
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs index 422f0b50..5dce082c 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs @@ -38,6 +38,7 @@ namespace Google.Protobuf.TestProtos { #region Messages public sealed partial class PublicImportMessage : pb::IMessage<PublicImportMessage> { private static readonly pb::MessageParser<PublicImportMessage> _parser = new pb::MessageParser<PublicImportMessage>(() => new PublicImportMessage()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<PublicImportMessage> Parser { get { return _parser; } } @@ -61,6 +62,7 @@ namespace Google.Protobuf.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public PublicImportMessage(PublicImportMessage other) : this() { e_ = other.e_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -93,13 +95,16 @@ namespace Google.Protobuf.TestProtos { return true; } if (E != other.E) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (E != 0) hash ^= E.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -114,6 +119,9 @@ namespace Google.Protobuf.TestProtos { output.WriteRawTag(8); output.WriteInt32(E); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -122,6 +130,9 @@ namespace Google.Protobuf.TestProtos { if (E != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(E); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -133,6 +144,7 @@ namespace Google.Protobuf.TestProtos { if (other.E != 0) { E = other.E; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -141,7 +153,7 @@ namespace Google.Protobuf.TestProtos { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { E = input.ReadInt32(); |