aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
diff options
context:
space:
mode:
authorJie Luo <jieluo@google.com>2017-12-19 11:54:11 -0800
committerJie Luo <jieluo@google.com>2017-12-19 15:38:02 -0800
commitb308580bb1c3f87a062ac1448a3e0bdaab9d40cf (patch)
treeea211f27b3deb05a9ba5461079288020a11b5c8d /csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
parent3a06fe1fc9590b534f403114a0668befba926947 (diff)
downloadprotobuf-b308580bb1c3f87a062ac1448a3e0bdaab9d40cf.tar.gz
protobuf-b308580bb1c3f87a062ac1448a3e0bdaab9d40cf.tar.bz2
protobuf-b308580bb1c3f87a062ac1448a3e0bdaab9d40cf.zip
Cherrypick for csharp, including:
Add preserve UnknownFields Compare floating point values bitwise Add auto-generated header to C# generated files
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
index ee4561ff..3565f433 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
@@ -1,5 +1,7 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/field_mask.proto
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/field_mask.proto
+// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@@ -248,6 +250,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// </summary>
public sealed partial class FieldMask : pb::IMessage<FieldMask> {
private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask());
+ private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<FieldMask> Parser { get { return _parser; } }
@@ -271,6 +274,7 @@ namespace Google.Protobuf.WellKnownTypes {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FieldMask(FieldMask other) : this() {
paths_ = other.paths_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -305,13 +309,16 @@ namespace Google.Protobuf.WellKnownTypes {
return true;
}
if(!paths_.Equals(other.paths_)) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= paths_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
@@ -323,12 +330,18 @@ namespace Google.Protobuf.WellKnownTypes {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
paths_.WriteTo(output, _repeated_paths_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += paths_.CalculateSize(_repeated_paths_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
@@ -338,6 +351,7 @@ namespace Google.Protobuf.WellKnownTypes {
return;
}
paths_.Add(other.paths_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -346,7 +360,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
paths_.AddEntriesFrom(input, _repeated_paths_codec);