aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/AddressBook/Addressbook.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/AddressBook/Addressbook.cs')
-rw-r--r--csharp/src/AddressBook/Addressbook.cs56
1 files changed, 47 insertions, 9 deletions
diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs
index e595e58b..21a8ce02 100644
--- a/csharp/src/AddressBook/Addressbook.cs
+++ b/csharp/src/AddressBook/Addressbook.cs
@@ -1,5 +1,7 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: addressbook.proto
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: addressbook.proto
+// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@@ -49,6 +51,7 @@ namespace Google.Protobuf.Examples.AddressBook {
/// </summary>
public sealed partial class Person : pb::IMessage<Person> {
private static readonly pb::MessageParser<Person> _parser = new pb::MessageParser<Person>(() => new Person());
+ private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Person> Parser { get { return _parser; } }
@@ -75,7 +78,8 @@ namespace Google.Protobuf.Examples.AddressBook {
id_ = other.id_;
email_ = other.email_;
phones_ = other.phones_.Clone();
- LastUpdated = other.lastUpdated_ != null ? other.LastUpdated.Clone() : null;
+ lastUpdated_ = other.lastUpdated_ != null ? other.lastUpdated_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -158,7 +162,7 @@ namespace Google.Protobuf.Examples.AddressBook {
if (Email != other.Email) return false;
if(!phones_.Equals(other.phones_)) return false;
if (!object.Equals(LastUpdated, other.LastUpdated)) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -169,6 +173,9 @@ namespace Google.Protobuf.Examples.AddressBook {
if (Email.Length != 0) hash ^= Email.GetHashCode();
hash ^= phones_.GetHashCode();
if (lastUpdated_ != null) hash ^= LastUpdated.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
@@ -196,6 +203,9 @@ namespace Google.Protobuf.Examples.AddressBook {
output.WriteRawTag(42);
output.WriteMessage(LastUpdated);
}
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -214,6 +224,9 @@ namespace Google.Protobuf.Examples.AddressBook {
if (lastUpdated_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastUpdated);
}
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
@@ -238,6 +251,7 @@ namespace Google.Protobuf.Examples.AddressBook {
}
LastUpdated.MergeFrom(other.LastUpdated);
}
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -246,7 +260,7 @@ namespace Google.Protobuf.Examples.AddressBook {
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
@@ -287,6 +301,7 @@ namespace Google.Protobuf.Examples.AddressBook {
public sealed partial class PhoneNumber : pb::IMessage<PhoneNumber> {
private static readonly pb::MessageParser<PhoneNumber> _parser = new pb::MessageParser<PhoneNumber>(() => new PhoneNumber());
+ private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<PhoneNumber> Parser { get { return _parser; } }
@@ -311,6 +326,7 @@ namespace Google.Protobuf.Examples.AddressBook {
public PhoneNumber(PhoneNumber other) : this() {
number_ = other.number_;
type_ = other.type_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -355,7 +371,7 @@ namespace Google.Protobuf.Examples.AddressBook {
}
if (Number != other.Number) return false;
if (Type != other.Type) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -363,6 +379,9 @@ namespace Google.Protobuf.Examples.AddressBook {
int hash = 1;
if (Number.Length != 0) hash ^= Number.GetHashCode();
if (Type != 0) hash ^= Type.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
@@ -381,6 +400,9 @@ namespace Google.Protobuf.Examples.AddressBook {
output.WriteRawTag(16);
output.WriteEnum((int) Type);
}
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -392,6 +414,9 @@ namespace Google.Protobuf.Examples.AddressBook {
if (Type != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
}
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
@@ -406,6 +431,7 @@ namespace Google.Protobuf.Examples.AddressBook {
if (other.Type != 0) {
Type = other.Type;
}
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -414,7 +440,7 @@ namespace Google.Protobuf.Examples.AddressBook {
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Number = input.ReadString();
@@ -440,6 +466,7 @@ namespace Google.Protobuf.Examples.AddressBook {
/// </summary>
public sealed partial class AddressBook : pb::IMessage<AddressBook> {
private static readonly pb::MessageParser<AddressBook> _parser = new pb::MessageParser<AddressBook>(() => new AddressBook());
+ private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<AddressBook> Parser { get { return _parser; } }
@@ -463,6 +490,7 @@ namespace Google.Protobuf.Examples.AddressBook {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AddressBook(AddressBook other) : this() {
people_ = other.people_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -494,13 +522,16 @@ namespace Google.Protobuf.Examples.AddressBook {
return true;
}
if(!people_.Equals(other.people_)) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= people_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
@@ -512,12 +543,18 @@ namespace Google.Protobuf.Examples.AddressBook {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
people_.WriteTo(output, _repeated_people_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += people_.CalculateSize(_repeated_people_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
@@ -527,6 +564,7 @@ namespace Google.Protobuf.Examples.AddressBook {
return;
}
people_.Add(other.people_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -535,7 +573,7 @@ namespace Google.Protobuf.Examples.AddressBook {
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
people_.AddEntriesFrom(input, _repeated_people_codec);