/* * 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 VerifyPrinterToolRequestMapper { // 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.VerifyPrinterToolRequest get(VerifyPrinterToolRequest itacVerifyPrinterToolRequest) { if (itacVerifyPrinterToolRequest == null) { return null; } Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest asmVerifyPrinterToolRequest = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest(); mapItac2Asm(asmVerifyPrinterToolRequest, itacVerifyPrinterToolRequest); return asmVerifyPrinterToolRequest; } public static void mapItac2Asm(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest asmVerifyPrinterToolRequest, VerifyPrinterToolRequest itacVerifyPrinterToolRequest) { // complex property PrinterTool, isArray:False, isGeneric:False asmVerifyPrinterToolRequest.PrinterTool = com.itac.oib.siplacesetupcenter.contracts.data.PrinterToolMapper.get( itacVerifyPrinterToolRequest.PrinterTool); } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest[] get(VerifyPrinterToolRequest[] itacVerifyPrinterToolRequest) { if (itacVerifyPrinterToolRequest == null) { return null; } Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest[] asmVerifyPrinterToolRequest = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest[itacVerifyPrinterToolRequest.Length]; for (int i = 0; i < itacVerifyPrinterToolRequest.Length; i++) { // to itac array asmVerifyPrinterToolRequest[i] = VerifyPrinterToolRequestMapper.get(itacVerifyPrinterToolRequest[i]); } return asmVerifyPrinterToolRequest; } // maps iTAC namespace conform array to ASM namespace list public static List getList(VerifyPrinterToolRequest[] asmVerifyPrinterToolRequest) { if (asmVerifyPrinterToolRequest == null) { return null; } List itacVerifyPrinterToolRequest = new List(); for (int i = 0; i < asmVerifyPrinterToolRequest.Length; i++) { itacVerifyPrinterToolRequest.Add(VerifyPrinterToolRequestMapper.get(asmVerifyPrinterToolRequest[i])); } return itacVerifyPrinterToolRequest; } // map type from ASM namespace to iTAC namespace public static VerifyPrinterToolRequest get(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest asmVerifyPrinterToolRequest) { if (asmVerifyPrinterToolRequest == null) { return null; } VerifyPrinterToolRequest itacVerifyPrinterToolRequest = new VerifyPrinterToolRequest(); mapAsm2Itac(asmVerifyPrinterToolRequest, itacVerifyPrinterToolRequest); return itacVerifyPrinterToolRequest; } public static void mapAsm2Itac(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest asmVerifyPrinterToolRequest, VerifyPrinterToolRequest itacVerifyPrinterToolRequest) { itacVerifyPrinterToolRequest.PrinterTool = com.itac.oib.siplacesetupcenter.contracts.data.PrinterToolMapper.get(asmVerifyPrinterToolRequest.PrinterTool); // complex asm property PrinterTool } // maps ASM namespace conform list to iTAC namespace array public static VerifyPrinterToolRequest[] getArray(IList asmVerifyPrinterToolRequest) { if (asmVerifyPrinterToolRequest == null) { return null; } VerifyPrinterToolRequest[] itacVerifyPrinterToolRequest = new VerifyPrinterToolRequest[asmVerifyPrinterToolRequest.Count]; for (int i = 0; i < asmVerifyPrinterToolRequest.Count; i++) { itacVerifyPrinterToolRequest[i] = VerifyPrinterToolRequestMapper.get(asmVerifyPrinterToolRequest[i]); } return itacVerifyPrinterToolRequest; } // maps ASM namespace conform array to iTAC namespace array public static VerifyPrinterToolRequest[] getArray(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.VerifyPrinterToolRequest[] asmVerifyPrinterToolRequest) { if (asmVerifyPrinterToolRequest == null) { return null; } VerifyPrinterToolRequest[] itacVerifyPrinterToolRequest = new VerifyPrinterToolRequest[asmVerifyPrinterToolRequest.Length]; for (int i = 0; i < asmVerifyPrinterToolRequest.Length; i++) { itacVerifyPrinterToolRequest[i] = VerifyPrinterToolRequestMapper.get(asmVerifyPrinterToolRequest[i]); } return itacVerifyPrinterToolRequest; } } }