Beispiel #1
0
 public void MergeFrom(MsgOnChat other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Channel != 0)
     {
         Channel = other.Channel;
     }
     if (other.from_ != null)
     {
         if (from_ == null)
         {
             from_ = new global::Org.OkraAx.V3.MsgChatUserInfo();
         }
         From.MergeFrom(other.From);
     }
     if (other.to_ != null)
     {
         if (to_ == null)
         {
             to_ = new global::Org.OkraAx.V3.AxAny();
         }
         To.MergeFrom(other.To);
     }
     if (other.Content.Length != 0)
     {
         Content = other.Content;
     }
 }
Beispiel #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    Channel = input.ReadInt32();
                    break;
                }

                case 18: {
                    if (from_ == null)
                    {
                        from_ = new global::Org.OkraAx.V3.MsgChatUserInfo();
                    }
                    input.ReadMessage(from_);
                    break;
                }

                case 26: {
                    if (to_ == null)
                    {
                        to_ = new global::Org.OkraAx.V3.AxAny();
                    }
                    input.ReadMessage(to_);
                    break;
                }

                case 34: {
                    Content = input.ReadString();
                    break;
                }
                }
            }
        }