aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
index ee4561ff..1502c096 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
@@ -248,6 +248,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 +272,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 +307,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 +328,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 +349,7 @@ namespace Google.Protobuf.WellKnownTypes {
return;
}
paths_.Add(other.paths_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -346,7 +358,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);