コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }