Beispiel #1
0
 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);
 }
Beispiel #2
0
        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
        }
Beispiel #3
0
        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;
                }
                }
            }
        }