public override int GetHashCode() { int hash = 1; if (Username.Length != 0) { hash ^= Username.GetHashCode(); } hash ^= emailAddresses_.GetHashCode(); if (Type != global::Dogdata.CustomType.Roar) { hash ^= Type.GetHashCode(); } if (testCase_ == TestOneofCase.Name) { hash ^= Name.GetHashCode(); } if (testCase_ == TestOneofCase.Name2) { hash ^= Name2.GetHashCode(); } hash ^= AnimalFood.GetHashCode(); if (noDiffrentWhat_ != null) { hash ^= NoDiffrentWhat.GetHashCode(); } hash ^= (int)testCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(Customer other) { if (other == null) { return; } if (other.Username.Length != 0) { Username = other.Username; } emailAddresses_.Add(other.emailAddresses_); if (other.Type != global::Dogdata.CustomType.Roar) { Type = other.Type; } animalFood_.Add(other.animalFood_); if (other.noDiffrentWhat_ != null) { if (noDiffrentWhat_ == null) { NoDiffrentWhat = new global::Google.Protobuf.WellKnownTypes.Any(); } NoDiffrentWhat.MergeFrom(other.NoDiffrentWhat); } switch (other.TestCase) { case TestOneofCase.Name: Name = other.Name; break; case TestOneofCase.Name2: Name2 = other.Name2; break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }