/* * Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved. * * This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, * printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language * without the written permission of iTAC Software AG. */ // created 06.11.2018 11:07:38 using System; using System.Collections.Generic; namespace com.itac.oib.siplacesetupcenter.contracts.data { // source: assembly 5.1.0.84 // source: assembly ASM.AS.OIB.SIPLACESetupCenter.Contracts public class PrinterToolVerifiedReportMapper { // used for itac->asm: True // used for asm->itac: True // maps iTAC namespace conform type to ASM namespace type public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport get(PrinterToolVerifiedReport itacPrinterToolVerifiedReport) { if (itacPrinterToolVerifiedReport == null) { return null; } Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport asmPrinterToolVerifiedReport = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport(); mapItac2Asm(asmPrinterToolVerifiedReport, itacPrinterToolVerifiedReport); return asmPrinterToolVerifiedReport; } public static void mapItac2Asm(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport asmPrinterToolVerifiedReport, PrinterToolVerifiedReport itacPrinterToolVerifiedReport) { // complex property PrinterTool, isArray:False, isGeneric:False asmPrinterToolVerifiedReport.PrinterTool = com.itac.oib.siplacesetupcenter.contracts.data.PrinterToolMapper.get( itacPrinterToolVerifiedReport.PrinterTool); } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport[] get(PrinterToolVerifiedReport[] itacPrinterToolVerifiedReport) { if (itacPrinterToolVerifiedReport == null) { return null; } Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport[] asmPrinterToolVerifiedReport = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport[itacPrinterToolVerifiedReport.Length]; for (int i = 0; i < itacPrinterToolVerifiedReport.Length; i++) { // to itac array asmPrinterToolVerifiedReport[i] = PrinterToolVerifiedReportMapper.get(itacPrinterToolVerifiedReport[i]); } return asmPrinterToolVerifiedReport; } // maps iTAC namespace conform array to ASM namespace list public static List getList(PrinterToolVerifiedReport[] asmPrinterToolVerifiedReport) { if (asmPrinterToolVerifiedReport == null) { return null; } List itacPrinterToolVerifiedReport = new List(); for (int i = 0; i < asmPrinterToolVerifiedReport.Length; i++) { itacPrinterToolVerifiedReport.Add(PrinterToolVerifiedReportMapper.get(asmPrinterToolVerifiedReport[i])); } return itacPrinterToolVerifiedReport; } // map type from ASM namespace to iTAC namespace public static PrinterToolVerifiedReport get(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport asmPrinterToolVerifiedReport) { if (asmPrinterToolVerifiedReport == null) { return null; } PrinterToolVerifiedReport itacPrinterToolVerifiedReport = new PrinterToolVerifiedReport(); mapAsm2Itac(asmPrinterToolVerifiedReport, itacPrinterToolVerifiedReport); return itacPrinterToolVerifiedReport; } public static void mapAsm2Itac(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport asmPrinterToolVerifiedReport, PrinterToolVerifiedReport itacPrinterToolVerifiedReport) { itacPrinterToolVerifiedReport.PrinterTool = com.itac.oib.siplacesetupcenter.contracts.data.PrinterToolMapper.get(asmPrinterToolVerifiedReport.PrinterTool); // complex asm property PrinterTool } // maps ASM namespace conform list to iTAC namespace array public static PrinterToolVerifiedReport[] getArray(IList asmPrinterToolVerifiedReport) { if (asmPrinterToolVerifiedReport == null) { return null; } PrinterToolVerifiedReport[] itacPrinterToolVerifiedReport = new PrinterToolVerifiedReport[asmPrinterToolVerifiedReport.Count]; for (int i = 0; i < asmPrinterToolVerifiedReport.Count; i++) { itacPrinterToolVerifiedReport[i] = PrinterToolVerifiedReportMapper.get(asmPrinterToolVerifiedReport[i]); } return itacPrinterToolVerifiedReport; } // maps ASM namespace conform array to iTAC namespace array public static PrinterToolVerifiedReport[] getArray(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterToolVerifiedReport[] asmPrinterToolVerifiedReport) { if (asmPrinterToolVerifiedReport == null) { return null; } PrinterToolVerifiedReport[] itacPrinterToolVerifiedReport = new PrinterToolVerifiedReport[asmPrinterToolVerifiedReport.Length]; for (int i = 0; i < asmPrinterToolVerifiedReport.Length; i++) { itacPrinterToolVerifiedReport[i] = PrinterToolVerifiedReportMapper.get(asmPrinterToolVerifiedReport[i]); } return itacPrinterToolVerifiedReport; } } }