Ejemplo n.º 1
0
 public void MergeFrom(DeviceStatus other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CmdCode.Length != 0)
     {
         CmdCode = other.CmdCode;
     }
     if (other.Identity.Length != 0)
     {
         Identity = other.Identity;
     }
     if (other.OppositeId.Length != 0)
     {
         OppositeId = other.OppositeId;
     }
     if (other.lightStatus_ != null)
     {
         if (lightStatus_ == null)
         {
             lightStatus_ = new global::SocketCmd.LightStatus();
         }
         LightStatus.MergeFrom(other.LightStatus);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 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 10: {
                    CmdCode = input.ReadString();
                    break;
                }

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

                case 26: {
                    OppositeId = input.ReadString();
                    break;
                }

                case 186: {
                    if (lightStatus_ == null)
                    {
                        lightStatus_ = new global::SocketCmd.LightStatus();
                    }
                    input.ReadMessage(lightStatus_);
                    break;
                }
                }
            }
        }