public void MergeFrom(Beatmap other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.LevelId.Length != 0) { LevelId = other.LevelId; } if (other.characteristic_ != null) { if (characteristic_ == null) { Characteristic = new global::TournamentAssistantShared.Models.Characteristic(); } Characteristic.MergeFrom(other.Characteristic); } if (other.Difficulty != global::TournamentAssistantShared.Models.BeatmapDifficulty.Easy) { Difficulty = other.Difficulty; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(Match other) { if (other == null) { return; } if (other.Guid.Length != 0) { Guid = other.Guid; } players_.Add(other.players_); if (other.selectedLevel_ != null) { if (selectedLevel_ == null) { SelectedLevel = new global::TournamentAssistantShared.Models.PreviewBeatmapLevel(); } SelectedLevel.MergeFrom(other.SelectedLevel); } if (other.selectedCharacteristic_ != null) { if (selectedCharacteristic_ == null) { SelectedCharacteristic = new global::TournamentAssistantShared.Models.Characteristic(); } SelectedCharacteristic.MergeFrom(other.SelectedCharacteristic); } if (other.SelectedDifficulty != global::TournamentAssistantShared.Models.BeatmapDifficulty.Easy) { SelectedDifficulty = other.SelectedDifficulty; } switch (other.LeaderCase) { case LeaderOneofCase.Coordinator: if (Coordinator == null) { Coordinator = new global::TournamentAssistantShared.Models.Coordinator(); } Coordinator.MergeFrom(other.Coordinator); break; case LeaderOneofCase.Player: if (Player == null) { Player = new global::TournamentAssistantShared.Models.Player(); } Player.MergeFrom(other.Player); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 18: { LevelId = input.ReadString(); break; } case 26: { if (characteristic_ == null) { Characteristic = new global::TournamentAssistantShared.Models.Characteristic(); } input.ReadMessage(Characteristic); break; } case 32: { Difficulty = (global::TournamentAssistantShared.Models.BeatmapDifficulty)input.ReadEnum(); break; } } } #endif }
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { Name = input.ReadString(); break; } case 18: { LevelId = input.ReadString(); break; } case 26: { if (characteristic_ == null) { Characteristic = new global::TournamentAssistantShared.Models.Characteristic(); } input.ReadMessage(Characteristic); break; } case 32: { Difficulty = (global::TournamentAssistantShared.Models.BeatmapDifficulty)input.ReadEnum(); break; } } } }
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { Guid = input.ReadString(); break; } case 18: { players_.AddEntriesFrom(ref input, _repeated_players_codec); break; } case 26: { global::TournamentAssistantShared.Models.Coordinator subBuilder = new global::TournamentAssistantShared.Models.Coordinator(); if (leaderCase_ == LeaderOneofCase.Coordinator) { subBuilder.MergeFrom(Coordinator); } input.ReadMessage(subBuilder); Coordinator = subBuilder; break; } case 34: { global::TournamentAssistantShared.Models.Player subBuilder = new global::TournamentAssistantShared.Models.Player(); if (leaderCase_ == LeaderOneofCase.Player) { subBuilder.MergeFrom(Player); } input.ReadMessage(subBuilder); Player = subBuilder; break; } case 42: { if (selectedLevel_ == null) { SelectedLevel = new global::TournamentAssistantShared.Models.PreviewBeatmapLevel(); } input.ReadMessage(SelectedLevel); break; } case 50: { if (selectedCharacteristic_ == null) { SelectedCharacteristic = new global::TournamentAssistantShared.Models.Characteristic(); } input.ReadMessage(SelectedCharacteristic); break; } case 56: { SelectedDifficulty = (global::TournamentAssistantShared.Models.BeatmapDifficulty)input.ReadEnum(); break; } } } }
public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Guid = input.ReadString(); break; } case 18: { players_.AddEntriesFrom(input, _repeated_players_codec); break; } case 26: { global::TournamentAssistantShared.Models.Coordinator subBuilder = new global::TournamentAssistantShared.Models.Coordinator(); if (leaderCase_ == LeaderOneofCase.Coordinator) { subBuilder.MergeFrom(Coordinator); } input.ReadMessage(subBuilder); Coordinator = subBuilder; break; } case 34: { global::TournamentAssistantShared.Models.Player subBuilder = new global::TournamentAssistantShared.Models.Player(); if (leaderCase_ == LeaderOneofCase.Player) { subBuilder.MergeFrom(Player); } input.ReadMessage(subBuilder); Player = subBuilder; break; } case 42: { if (selectedLevel_ == null) { SelectedLevel = new global::TournamentAssistantShared.Models.PreviewBeatmapLevel(); } input.ReadMessage(SelectedLevel); break; } case 50: { if (selectedCharacteristic_ == null) { SelectedCharacteristic = new global::TournamentAssistantShared.Models.Characteristic(); } input.ReadMessage(SelectedCharacteristic); break; } case 56: { SelectedDifficulty = (global::TournamentAssistantShared.Models.BeatmapDifficulty)input.ReadEnum(); break; } } } #endif }