/* * 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 // skip property String in this type // skip property String in this type 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 PackagingUnitLocationMapper { // used for itac->asm: True // used for asm->itac: True // maps iTAC namespace conform type to ASM namespace type public static www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation get(PackagingUnitLocation itacPackagingUnitLocation) { if (itacPackagingUnitLocation == null) { return null; } www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation asmPackagingUnitLocation = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation(); mapItac2Asm(asmPackagingUnitLocation, itacPackagingUnitLocation); return asmPackagingUnitLocation; } public static void mapItac2Asm(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation asmPackagingUnitLocation, PackagingUnitLocation itacPackagingUnitLocation) { // complex property PackagingUnit, isArray:False, isGeneric:False asmPackagingUnitLocation.PackagingUnit = com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(itacPackagingUnitLocation.PackagingUnit); // complex property ComponentLocation, isArray:False, isGeneric:False asmPackagingUnitLocation.ComponentLocation = com.itac.oib.siplacesetupcenter.contracts.data.ComponentLocationMapper.get(itacPackagingUnitLocation.ComponentLocation); asmPackagingUnitLocation.SetupPath = itacPackagingUnitLocation.SetupPath; asmPackagingUnitLocation.LinePath = itacPackagingUnitLocation.LinePath; // skip property String in this type // skip property String in this type } // maps iTAC namespace conform array to ASM namespace array public static www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation[] get(PackagingUnitLocation[] itacPackagingUnitLocation) { if (itacPackagingUnitLocation == null) { return null; } www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation[] asmPackagingUnitLocation = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation[itacPackagingUnitLocation.Length]; for (int i = 0; i < itacPackagingUnitLocation.Length; i++) { // to itac array asmPackagingUnitLocation[i] = PackagingUnitLocationMapper.get(itacPackagingUnitLocation[i]); } return asmPackagingUnitLocation; } // maps iTAC namespace conform array to ASM namespace list public static List getList(PackagingUnitLocation[] asmPackagingUnitLocation) { if (asmPackagingUnitLocation == null) { return null; } List itacPackagingUnitLocation = new List(); for (int i = 0; i < asmPackagingUnitLocation.Length; i++) { itacPackagingUnitLocation.Add(PackagingUnitLocationMapper.get(asmPackagingUnitLocation[i])); } return itacPackagingUnitLocation; } // map type from ASM namespace to iTAC namespace public static PackagingUnitLocation get(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation asmPackagingUnitLocation) { if (asmPackagingUnitLocation == null) { return null; } PackagingUnitLocation itacPackagingUnitLocation = new PackagingUnitLocation(); mapAsm2Itac(asmPackagingUnitLocation, itacPackagingUnitLocation); return itacPackagingUnitLocation; } public static void mapAsm2Itac(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation asmPackagingUnitLocation, PackagingUnitLocation itacPackagingUnitLocation) { itacPackagingUnitLocation.PackagingUnit = com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(asmPackagingUnitLocation.PackagingUnit); // complex asm property PackagingUnit itacPackagingUnitLocation.ComponentLocation = com.itac.oib.siplacesetupcenter.contracts.data.ComponentLocationMapper.get(asmPackagingUnitLocation.ComponentLocation); // complex asm property ComponentLocation itacPackagingUnitLocation.SetupPath = asmPackagingUnitLocation.SetupPath; itacPackagingUnitLocation.LinePath = asmPackagingUnitLocation.LinePath; // skip property String in this type // skip property String in this type } // maps ASM namespace conform list to iTAC namespace array public static PackagingUnitLocation[] getArray(IList asmPackagingUnitLocation) { if (asmPackagingUnitLocation == null) { return null; } PackagingUnitLocation[] itacPackagingUnitLocation = new PackagingUnitLocation[asmPackagingUnitLocation.Count]; for (int i = 0; i < asmPackagingUnitLocation.Count; i++) { itacPackagingUnitLocation[i] = PackagingUnitLocationMapper.get(asmPackagingUnitLocation[i]); } return itacPackagingUnitLocation; } // maps ASM namespace conform array to iTAC namespace array public static PackagingUnitLocation[] getArray(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.PackagingUnitLocation[] asmPackagingUnitLocation) { if (asmPackagingUnitLocation == null) { return null; } PackagingUnitLocation[] itacPackagingUnitLocation = new PackagingUnitLocation[asmPackagingUnitLocation.Length]; for (int i = 0; i < asmPackagingUnitLocation.Length; i++) { itacPackagingUnitLocation[i] = PackagingUnitLocationMapper.get(asmPackagingUnitLocation[i]); } return itacPackagingUnitLocation; } } }