Exemple #1
0
 public void MergeFrom(Msg other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0UL)
     {
         Id = other.Id;
     }
     if (other.Route.Length != 0)
     {
         Route = other.Route;
     }
     if (other.Data.Length != 0)
     {
         Data = other.Data;
     }
     if (other.Reply.Length != 0)
     {
         Reply = other.Reply;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #2
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: {
                    Id = input.ReadUInt64();
                    break;
                }

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

                case 26: {
                    Data = input.ReadBytes();
                    break;
                }

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

                case 40: {
                    type_ = (global::Protos.MsgType)input.ReadEnum();
                    break;
                }
                }
            }
        }