/* * 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 05.11.2018 14:52:23 // skip property Location, declared in StationLocation // skip property StationType, declared in StationLocation // skip property AttachableHead, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property DictionaryProxy`2, property in exclude list // skip property Gantry, declared in StationLocation using System; using System.Collections.Generic; namespace com.itac.oib.siplacepro.contracts.data { // source: assembly 5.1.0.84 // source: assembly ASM.AS.OIB.SIPLACEPro.Proxy public class StationLocationMapper { // used for itac->asm: True // used for asm->itac: True // maps iTAC namespace conform type to ASM namespace type public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation get(StationLocation itacStationLocation) { if (itacStationLocation == null) { return null; } Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation asmStationLocation = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation(); mapItac2Asm(asmStationLocation, itacStationLocation); return asmStationLocation; } public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation asmStationLocation, StationLocation itacStationLocation) { // skip property Location, declared in StationLocation // skip readonly property StationSetup // skip readonly property Station // skip property StationType, declared in StationLocation // skip property AttachableHead, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property DictionaryProxy`2, property in exclude list // skip readonly property TableInsert // skip readonly property Number // skip property Gantry, declared in StationLocation asmStationLocation.NozzlePerReceptacle = itacStationLocation.NozzlePerReceptacle; asmStationLocation.NozzlePerReceptacle2 = itacStationLocation.NozzlePerReceptacle2; // skip readonly property EnablePerPocketNozzleChanger // complex property Table, isArray:False, isGeneric:False itacStationLocation.Table = com.itac.oib.siplacepro.contracts.data.TableMapper.get( asmStationLocation.Table); // skip readonly property SupportsTableDeconfiguration } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation[] get(StationLocation[] itacStationLocation) { if (itacStationLocation == null) { return null; } Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation[] asmStationLocation = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation[itacStationLocation.Length]; for (int i = 0; i < itacStationLocation.Length; i++) { // to itac array asmStationLocation[i] = StationLocationMapper.get(itacStationLocation[i]); } return asmStationLocation; } // maps iTAC namespace conform array to ASM namespace list public static List getList(StationLocation[] asmStationLocation) { if (asmStationLocation == null) { return null; } List itacStationLocation = new List(); for (int i = 0; i < asmStationLocation.Length; i++) { itacStationLocation.Add(StationLocationMapper.get(asmStationLocation[i])); } return itacStationLocation; } // map type from ASM namespace to iTAC namespace public static StationLocation get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation asmStationLocation) { if (asmStationLocation == null) { return null; } StationLocation itacStationLocation = new StationLocation(); mapAsm2Itac(asmStationLocation, itacStationLocation); return itacStationLocation; } public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation asmStationLocation, StationLocation itacStationLocation) { // skip property Location, declared in StationLocation itacStationLocation.StationSetup = com.itac.oib.siplacepro.contracts.data.StationSetupMapper.get(asmStationLocation.StationSetup); // complex asm property StationSetup itacStationLocation.Station = com.itac.oib.siplacepro.contracts.data.StationMapper.get(asmStationLocation.Station); // complex asm property Station // skip property StationType, declared in StationLocation // skip property AttachableHead, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property Camera, declared in StationLocation // skip property DictionaryProxy`2, property in exclude list itacStationLocation.TableInsert = com.itac.oib.siplacepro.contracts.data.TableInsertMapper.get(asmStationLocation.TableInsert); // complex asm property TableInsert itacStationLocation.Number = asmStationLocation.Number; // skip property Gantry, declared in StationLocation itacStationLocation.NozzlePerReceptacle = asmStationLocation.NozzlePerReceptacle; itacStationLocation.NozzlePerReceptacle2 = asmStationLocation.NozzlePerReceptacle2; itacStationLocation.EnablePerPocketNozzleChanger = asmStationLocation.EnablePerPocketNozzleChanger; itacStationLocation.Table = com.itac.oib.siplacepro.contracts.data.TableMapper.get(asmStationLocation.Table); // complex asm property Table itacStationLocation.SupportsTableDeconfiguration = asmStationLocation.SupportsTableDeconfiguration; } // maps ASM namespace conform list to iTAC namespace array public static StationLocation[] getArray(IList asmStationLocation) { if (asmStationLocation == null) { return null; } StationLocation[] itacStationLocation = new StationLocation[asmStationLocation.Count]; for (int i = 0; i < asmStationLocation.Count; i++) { itacStationLocation[i] = StationLocationMapper.get(asmStationLocation[i]); } return itacStationLocation; } // maps ASM namespace conform array to iTAC namespace array public static StationLocation[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.StationLocation[] asmStationLocation) { if (asmStationLocation == null) { return null; } StationLocation[] itacStationLocation = new StationLocation[asmStationLocation.Length]; for (int i = 0; i < asmStationLocation.Length; i++) { itacStationLocation[i] = StationLocationMapper.get(asmStationLocation[i]); } return itacStationLocation; } } }