/* * 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 (ignore generic type ComponentLevelIndicatorThreshold) 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 ComponentLevelIndicatorThresholdDataMapper { // 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.ComponentLevelIndicatorThresholdData get(ComponentLevelIndicatorThresholdData itacComponentLevelIndicatorThresholdData) { if (itacComponentLevelIndicatorThresholdData == null) { return null; } Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData asmComponentLevelIndicatorThresholdData = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData(); mapItac2Asm(asmComponentLevelIndicatorThresholdData, itacComponentLevelIndicatorThresholdData); return asmComponentLevelIndicatorThresholdData; } public static void mapItac2Asm(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData asmComponentLevelIndicatorThresholdData, ComponentLevelIndicatorThresholdData itacComponentLevelIndicatorThresholdData) { asmComponentLevelIndicatorThresholdData.MachineId = itacComponentLevelIndicatorThresholdData.MachineId; asmComponentLevelIndicatorThresholdData.StationPath = itacComponentLevelIndicatorThresholdData.StationPath; asmComponentLevelIndicatorThresholdData.StationType = itacComponentLevelIndicatorThresholdData.StationType; asmComponentLevelIndicatorThresholdData.LinePath = itacComponentLevelIndicatorThresholdData.LinePath; // skip (ignore generic type ComponentLevelIndicatorThreshold) } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData[] get(ComponentLevelIndicatorThresholdData[] itacComponentLevelIndicatorThresholdData) { if (itacComponentLevelIndicatorThresholdData == null) { return null; } Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData[] asmComponentLevelIndicatorThresholdData = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData[itacComponentLevelIndicatorThresholdData.Length]; for (int i = 0; i < itacComponentLevelIndicatorThresholdData.Length; i++) { // to itac array asmComponentLevelIndicatorThresholdData[i] = ComponentLevelIndicatorThresholdDataMapper.get(itacComponentLevelIndicatorThresholdData[i]); } return asmComponentLevelIndicatorThresholdData; } // maps iTAC namespace conform array to ASM namespace list public static List getList(ComponentLevelIndicatorThresholdData[] asmComponentLevelIndicatorThresholdData) { if (asmComponentLevelIndicatorThresholdData == null) { return null; } List itacComponentLevelIndicatorThresholdData = new List(); for (int i = 0; i < asmComponentLevelIndicatorThresholdData.Length; i++) { itacComponentLevelIndicatorThresholdData.Add(ComponentLevelIndicatorThresholdDataMapper.get(asmComponentLevelIndicatorThresholdData[i])); } return itacComponentLevelIndicatorThresholdData; } // map type from ASM namespace to iTAC namespace public static ComponentLevelIndicatorThresholdData get(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData asmComponentLevelIndicatorThresholdData) { if (asmComponentLevelIndicatorThresholdData == null) { return null; } ComponentLevelIndicatorThresholdData itacComponentLevelIndicatorThresholdData = new ComponentLevelIndicatorThresholdData(); mapAsm2Itac(asmComponentLevelIndicatorThresholdData, itacComponentLevelIndicatorThresholdData); return itacComponentLevelIndicatorThresholdData; } public static void mapAsm2Itac(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData asmComponentLevelIndicatorThresholdData, ComponentLevelIndicatorThresholdData itacComponentLevelIndicatorThresholdData) { itacComponentLevelIndicatorThresholdData.MachineId = asmComponentLevelIndicatorThresholdData.MachineId; itacComponentLevelIndicatorThresholdData.StationPath = asmComponentLevelIndicatorThresholdData.StationPath; itacComponentLevelIndicatorThresholdData.StationType = asmComponentLevelIndicatorThresholdData.StationType; itacComponentLevelIndicatorThresholdData.LinePath = asmComponentLevelIndicatorThresholdData.LinePath; // skip (ignore generic type ComponentLevelIndicatorThreshold) } // maps ASM namespace conform list to iTAC namespace array public static ComponentLevelIndicatorThresholdData[] getArray(IList asmComponentLevelIndicatorThresholdData) { if (asmComponentLevelIndicatorThresholdData == null) { return null; } ComponentLevelIndicatorThresholdData[] itacComponentLevelIndicatorThresholdData = new ComponentLevelIndicatorThresholdData[asmComponentLevelIndicatorThresholdData.Count]; for (int i = 0; i < asmComponentLevelIndicatorThresholdData.Count; i++) { itacComponentLevelIndicatorThresholdData[i] = ComponentLevelIndicatorThresholdDataMapper.get(asmComponentLevelIndicatorThresholdData[i]); } return itacComponentLevelIndicatorThresholdData; } // maps ASM namespace conform array to iTAC namespace array public static ComponentLevelIndicatorThresholdData[] getArray(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.ComponentLevelIndicatorThresholdData[] asmComponentLevelIndicatorThresholdData) { if (asmComponentLevelIndicatorThresholdData == null) { return null; } ComponentLevelIndicatorThresholdData[] itacComponentLevelIndicatorThresholdData = new ComponentLevelIndicatorThresholdData[asmComponentLevelIndicatorThresholdData.Length]; for (int i = 0; i < asmComponentLevelIndicatorThresholdData.Length; i++) { itacComponentLevelIndicatorThresholdData[i] = ComponentLevelIndicatorThresholdDataMapper.get(asmComponentLevelIndicatorThresholdData[i]); } return itacComponentLevelIndicatorThresholdData; } } }