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