public string WriteCustomerInfo(PQCustomerInfo info, out string error)
        {
            CodyPQRockeyArm rockeyArm = new CodyPQRockeyArm()
            {
                CustomerKey  = info.CustomerKey,
                CustomerName = info.CustomerName,
                EmpowerDate  = info.EmpowerDate,
            };

            byte[] bytes = SmartSerializeHelper.SerializeObject(rockeyArm, CodyPQRockeyArm.LoadBytes);
            info.HId = this.WriteCustomerInfo((int)CodySystemTypeEnum.PQ, bytes, out error);
            return(info.HId);
        }
        public PQCustomerInfo ReadCustomerInfo(out string error)
        {
            var             result          = this.ReadCustomerInfo((int)CodySystemTypeEnum.PQ, out error);
            CodyPQRockeyArm codyPQRockeyArm = SmartSerializeHelper.DeserializeObject <CodyPQRockeyArm>(result.ObjDatas, CodyPQRockeyArm.LoadObj);

            return(new PQCustomerInfo()
            {
                CustomerKey = codyPQRockeyArm.CustomerKey,
                CustomerName = codyPQRockeyArm.CustomerName,
                CodySystemType = (int)CodySystemTypeEnum.PQ,
                EmpowerDate = codyPQRockeyArm.EmpowerDate,
                HId = RockeyArmHelper.GetHIdStr(result.PDongleInfo)
            });
        }
예제 #3
0
        public static void LoadObj(SmartObjectDeserializer deserializer, CodyPQRockeyArm obj)
        {
            CodySecrecyObjBase.LoadObj(deserializer, obj);

            obj.EmpowerDate = deserializer.ReadNullableDateTime();
        }
예제 #4
0
        public static void LoadBytes(SmartObjectSerializer serializer, CodyPQRockeyArm obj)
        {
            CodySecrecyObjBase.LoadBytes(serializer, obj);

            serializer.Write(obj.EmpowerDate);
        }