Exemple #1
0
        /// <summary>
        /// Initalises a new extension from the received data
        /// </summary>
        /// <param name="data">byte array of data to parse</param>
        /// <returns>new UserDefined Extension</returns>
        internal override ExtensionBase Create(SlpReader reader)
        {
            var result = new UnknownExtension();
            result._Id = reader.ReadInt16();
            result.Offset = reader.ReadInt24();
            result.Data = reader.ReadBytes(result.Offset);

            return result;
        }
Exemple #2
0
        /// <summary>
        /// Initalises a new extension from the received data
        /// </summary>
        /// <param name="data">byte array of data to parse</param>
        /// <returns>new UserDefined Extension</returns>
        internal override ExtensionBase Create(SlpReader reader)
        {
            var result = new UnknownExtension();

            result._Id    = reader.ReadInt16();
            result.Offset = reader.ReadInt24();
            result.Data   = reader.ReadBytes(result.Offset);

            return(result);
        }