ReadBinary() private method

private ReadBinary ( byte &result ) : bool
result byte
return bool
Exemplo n.º 1
0
        /// <summary>
        /// </summary>
        /// <param name="unpacker">
        /// </param>
        public void UnpackFromMessage(Unpacker unpacker)
        {
            // Read the type name
            this.typeName = unpacker.LastReadData.AsString();

            // Read the data object as byte array
            byte[] temp;
            unpacker.ReadBinary(out temp);

            // Create a message serializer object
            IMessagePackSingleObjectSerializer ser = MessagePackSerializer.Create(Type.GetType(this.typeName));

            // Unpack the message's data object
            this.dataObject = (MessageBase)ser.UnpackSingleObject(temp);
        }