예제 #1
0
        /// <summary>
        /// 消息体序列化
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static byte[] encode(object value)
        {
            OpenModel model = value as OpenModel;
            ByteArray ba    = new ByteArray();

            ba.write(model.commond);
            ba.write(model.parameter);
            ba.write(model.message);

            byte[] result = ba.getBuff();
            ba.Close();
            return(result);
        }