private void AddFirstPart(CommandResponsePartDatagram partDgram)
 {
     this.TotalParts = partDgram.TotalParts;
     this.parts = new byte[this.TotalParts][];
     this.parts[partDgram.PartNumber] = partDgram.GetBytes();
     this.CheckForCompletion();
 }
        public void AddPart(CommandResponsePartDatagram partDatagram)
        {
            if (partDatagram == null)
            {
                throw new ArgumentNullException("partDatagram");
            }

            if (partDatagram.TotalParts != this.TotalParts)
            {
                throw new InvalidOperationException("Total parts varies in multi-part command response datagram.");
            }

            this.parts[partDatagram.PartNumber] = partDatagram.GetBytes();
            this.CheckForCompletion();
        }