/// <summary> /// This method is used to deserialize the items of the cell knowledge entry from the byte array. /// </summary> /// <param name="byteArray">Specify the byte array.</param> /// <param name="currentIndex">Specify the start index from the byte array.</param> /// <param name="lengthOfItems">Specify the current length of items in the cell knowledge entry.</param> protected override void DeserializeItemsFromByteArray(byte[] byteArray, ref int currentIndex, int lengthOfItems) { int index = currentIndex; this.SerialNumber = BasicObject.Parse <SerialNumber>(byteArray, ref index); if (index - currentIndex != lengthOfItems) { throw new StreamObjectParseErrorException(currentIndex, "CellKnowledgeEntry", "Stream object over-parse error", null); } currentIndex = index; }
/// <summary> /// Deserialize items from byte array. /// </summary> /// <param name="byteArray">The byte array which contains response message.</param> /// <param name="currentIndex">The index special where to start.</param> /// <param name="lengthOfItems">The length of items.</param> protected override void DeserializeItemsFromByteArray(byte[] byteArray, ref int currentIndex, int lengthOfItems) { int index = currentIndex; this.DataElementExtendedGUID = BasicObject.Parse <ExGuid>(byteArray, ref index); this.SerialNumber = BasicObject.Parse <SerialNumber>(byteArray, ref index); if (index - currentIndex != lengthOfItems) { throw new StreamObjectParseErrorException(currentIndex, "PutChangesResponseSerialNumberReassign", "Stream object over-parse error", null); } currentIndex = index; }
/// <summary> /// Used to Deserialize the items. /// </summary> /// <param name="byteArray">Byte array</param> /// <param name="currentIndex">Start position</param> /// <param name="lengthOfItems">The length of the items</param> protected override void DeserializeItemsFromByteArray(byte[] byteArray, ref int currentIndex, int lengthOfItems) { int index = currentIndex; this.ManifestMappingExtendedGUID = BasicObject.Parse <ExGuid>(byteArray, ref index); this.ManifestMappingSerialNumber = BasicObject.Parse <SerialNumber>(byteArray, ref index); if (index - currentIndex != lengthOfItems) { throw new StreamObjectParseErrorException(currentIndex, "StorageIndexManifestMapping", "Stream object over-parse error", null); } currentIndex = index; }
/// <summary> /// Initializes a new instance of the SerialNumber class, this is the copy constructor. /// </summary> /// <param name="sn">Specify the serial number where copy from.</param> public SerialNumber(SerialNumber sn) { this.GUID = sn.GUID; this.Value = sn.Value; }