Пример #1
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: {
                    EventId = input.ReadString();
                    break;
                }

                case 18: {
                    Name = input.ReadString();
                    break;
                }

                case 26: {
                    if (guild_ == null)
                    {
                        Guild = new global::TournamentAssistantShared.Models.Discord.Guild();
                    }
                    input.ReadMessage(Guild);
                    break;
                }

                case 34: {
                    if (infoChannel_ == null)
                    {
                        InfoChannel = new global::TournamentAssistantShared.Models.Discord.Channel();
                    }
                    input.ReadMessage(InfoChannel);
                    break;
                }

                case 42: {
                    qualifierMaps_.AddEntriesFrom(input, _repeated_qualifierMaps_codec);
                    break;
                }

                case 48: {
                    SendScoresToInfoChannel = input.ReadBool();
                    break;
                }

                case 56: {
                    Flags = input.ReadInt32();
                    break;
                }
                }
            }
    #endif
        }
Пример #2
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: {
                    EventId = input.ReadString();
                    break;
                }

                case 18: {
                    Name = input.ReadString();
                    break;
                }

                case 26: {
                    if (guild_ == null)
                    {
                        Guild = new global::TournamentAssistantShared.Models.Discord.Guild();
                    }
                    input.ReadMessage(Guild);
                    break;
                }

                case 34: {
                    if (infoChannel_ == null)
                    {
                        InfoChannel = new global::TournamentAssistantShared.Models.Discord.Channel();
                    }
                    input.ReadMessage(InfoChannel);
                    break;
                }

                case 42: {
                    qualifierMaps_.AddEntriesFrom(ref input, _repeated_qualifierMaps_codec);
                    break;
                }

                case 48: {
                    SendScoresToInfoChannel = input.ReadBool();
                    break;
                }

                case 56: {
                    Flags = input.ReadInt32();
                    break;
                }
                }
            }
        }
Пример #3
0
 public void MergeFrom(QualifierEvent other)
 {
     if (other == null)
     {
         return;
     }
     if (other.EventId.Length != 0)
     {
         EventId = other.EventId;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.guild_ != null)
     {
         if (guild_ == null)
         {
             Guild = new global::TournamentAssistantShared.Models.Discord.Guild();
         }
         Guild.MergeFrom(other.Guild);
     }
     if (other.infoChannel_ != null)
     {
         if (infoChannel_ == null)
         {
             InfoChannel = new global::TournamentAssistantShared.Models.Discord.Channel();
         }
         InfoChannel.MergeFrom(other.InfoChannel);
     }
     qualifierMaps_.Add(other.qualifierMaps_);
     if (other.SendScoresToInfoChannel != false)
     {
         SendScoresToInfoChannel = other.SendScoresToInfoChannel;
     }
     if (other.Flags != 0)
     {
         Flags = other.Flags;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }