Exemple #1
0
        public IntPtr Marshal(CashInfoObject cashInfo)
        {
            WFS_CDM_CashUnit_INFO dto = new WFS_CDM_CashUnit_INFO();

            dto.usCount    = cashInfo.usCount;
            dto.usTellerID = cashInfo.TellerID;
            WFSCDMCASHUNIT[] cashunitstructs = new WFSCDMCASHUNIT[cashInfo.CashUnits.Length];
            for (int i = 0; i < cashInfo.CashUnits.Length; i++)
            {
                cashunitstructs[i] = CashUnit.convertToWFSCDMCASHUNIT(cashInfo.CashUnits[i]);
            }

            dto.lppList = XFSUtil.XFSArrayToPTR <WFSCDMCASHUNIT>(cashunitstructs);
            return(XFSUtil.StructureToPtr <WFS_CDM_CashUnit_INFO>(dto));
        }
Exemple #2
0
        public ISTATUS UnMarshal(IntPtr pointer)
        {
            var cashinfoObj = new CashInfoObject();

            var cashunitInfo = new WFS_CDM_CashUnit_INFO();

            XFSUtil.PtrToStructure <WFS_CDM_CashUnit_INFO>(pointer, ref cashunitInfo);

            cashinfoObj.TellerID = cashunitInfo.usTellerID;
            cashinfoObj.usCount  = cashunitInfo.usCount;

            var cashUnits = XFSUtil.XFSPtrToArray <WFSCDMCASHUNIT>(cashunitInfo.lppList, cashunitInfo.usCount);

            cashinfoObj.CashUnits = new CashUnit[cashUnits.Length];

            for (int i = 0; i < cashUnits.Length; i++)
            {
                cashinfoObj.CashUnits[i] = CashUnit.convertToCashUnit(cashUnits[i]);
            }

            return(cashinfoObj);
        }