aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
diff options
context:
space:
mode:
authorGravatar Jisi Liu <liujisi@google.com>2017-12-19 17:45:56 -0800
committerGravatar GitHub <noreply@github.com>2017-12-19 17:45:56 -0800
commitd106399d39a3a5719f1e3d8b5997a4437eb83af3 (patch)
tree0b247a1d9a5fb782e432f1a17bb8eb90a4bdf24f /csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
parent6c3c7f6d5d68433af01c5ca500978c2d69f15212 (diff)
parentb308580bb1c3f87a062ac1448a3e0bdaab9d40cf (diff)
Merge pull request #4072 from google/jieluo
Cherrypick for csharp, including:
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
index aa89e08f..2113add9 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
@@ -1,5 +1,7 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/empty.proto
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/empty.proto
+// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@@ -50,6 +52,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// </summary>
public sealed partial class Empty : pb::IMessage<Empty> {
private static readonly pb::MessageParser<Empty> _parser = new pb::MessageParser<Empty>(() => new Empty());
+ private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Empty> Parser { get { return _parser; } }
@@ -72,6 +75,7 @@ namespace Google.Protobuf.WellKnownTypes {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Empty(Empty other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -92,12 +96,15 @@ namespace Google.Protobuf.WellKnownTypes {
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;
}
@@ -108,11 +115,17 @@ namespace Google.Protobuf.WellKnownTypes {
[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;
}
@@ -121,6 +134,7 @@ namespace Google.Protobuf.WellKnownTypes {
if (other == null) {
return;
}
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -129,7 +143,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
}
}