public void MergeFrom(Packet other) { if (other == null) { return; } if (other.Type != 0) { Type = other.Type; } if (other.command_ != null) { if (command_ == null) { command_ = new global::Command(); } Command.MergeFrom(other.Command); } if (other.bid_ != null) { if (bid_ == null) { bid_ = new global::Bid(); } Bid.MergeFrom(other.Bid); } if (other.action_ != null) { if (action_ == null) { action_ = new global::Action(); } Action.MergeFrom(other.Action); } if (other.stage_ != null) { if (stage_ == null) { stage_ = new global::Stage(); } Stage.MergeFrom(other.Stage); } if (other.Message.Length != 0) { Message = other.Message; } if (other.Status != false) { Status = other.Status; } }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 8: { type_ = (global::Packet.Types.Type)input.ReadEnum(); break; } case 18: { if (command_ == null) { command_ = new global::Command(); } input.ReadMessage(command_); break; } case 26: { if (bid_ == null) { bid_ = new global::Bid(); } input.ReadMessage(bid_); break; } case 34: { if (action_ == null) { action_ = new global::Action(); } input.ReadMessage(action_); break; } case 42: { if (stage_ == null) { stage_ = new global::Stage(); } input.ReadMessage(stage_); break; } case 50: { Message = input.ReadString(); break; } case 56: { Status = input.ReadBool(); break; } } } }