Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
 /// <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;
 }