Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 8: {
                    type_ = (global::NPitaya.Protos.RPCType)input.ReadEnum();
                    break;
                }

                case 18: {
                    if (session_ == null)
                    {
                        session_ = new global::NPitaya.Protos.Session();
                    }
                    input.ReadMessage(session_);
                    break;
                }

                case 26: {
                    if (msg_ == null)
                    {
                        msg_ = new global::NPitaya.Protos.Msg();
                    }
                    input.ReadMessage(msg_);
                    break;
                }

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

                case 42: {
                    Metadata = input.ReadBytes();
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
 public void MergeFrom(Request other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.session_ != null)
     {
         if (session_ == null)
         {
             session_ = new global::NPitaya.Protos.Session();
         }
         Session.MergeFrom(other.Session);
     }
     if (other.msg_ != null)
     {
         if (msg_ == null)
         {
             msg_ = new global::NPitaya.Protos.Msg();
         }
         Msg.MergeFrom(other.Msg);
     }
     if (other.FrontendID.Length != 0)
     {
         FrontendID = other.FrontendID;
     }
     if (other.Metadata.Length != 0)
     {
         Metadata = other.Metadata;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }