public void MergeFrom(Player other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.Name.Length != 0) { Name = other.Name; } if (other.UserId.Length != 0) { UserId = other.UserId; } if (other.team_ != null) { if (team_ == null) { Team = new global::TournamentAssistantShared.Models.Team(); } Team.MergeFrom(other.Team); } if (other.PlayState != global::TournamentAssistantShared.Models.Player.Types.PlayStates.Waiting) { PlayState = other.PlayState; } if (other.DownloadState != global::TournamentAssistantShared.Models.Player.Types.DownloadStates.None) { DownloadState = other.DownloadState; } if (other.Score != 0) { Score = other.Score; } if (other.Combo != 0) { Combo = other.Combo; } if (other.Accuracy != 0D) { Accuracy = other.Accuracy; } if (other.SongPosition != 0D) { SongPosition = other.SongPosition; } if (other.songList_ != null) { if (songList_ == null) { SongList = new global::TournamentAssistantShared.Models.Packets.SongList(); } SongList.MergeFrom(other.SongList); } modList_.Add(other.modList_); if (other.streamScreenCoordinates_ != null) { if (streamScreenCoordinates_ == null) { StreamScreenCoordinates = new global::TournamentAssistantShared.Models.Player.Types.Point(); } StreamScreenCoordinates.MergeFrom(other.StreamScreenCoordinates); } if (other.StreamDelayMs != 0L) { StreamDelayMs = other.StreamDelayMs; } if (other.StreamSyncStartMs != 0L) { StreamSyncStartMs = other.StreamSyncStartMs; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (team_ != null) { hash ^= Team.GetHashCode(); } if (PlayState != global::TournamentAssistantShared.Models.Player.Types.PlayStates.Waiting) { hash ^= PlayState.GetHashCode(); } if (DownloadState != global::TournamentAssistantShared.Models.Player.Types.DownloadStates.None) { hash ^= DownloadState.GetHashCode(); } if (Score != 0) { hash ^= Score.GetHashCode(); } if (Combo != 0) { hash ^= Combo.GetHashCode(); } if (Accuracy != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Accuracy); } if (SongPosition != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SongPosition); } if (songList_ != null) { hash ^= SongList.GetHashCode(); } hash ^= modList_.GetHashCode(); if (streamScreenCoordinates_ != null) { hash ^= StreamScreenCoordinates.GetHashCode(); } if (StreamDelayMs != 0L) { hash ^= StreamDelayMs.GetHashCode(); } if (StreamSyncStartMs != 0L) { hash ^= StreamSyncStartMs.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }