/* * 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 23.11.2018 08:10:38 using System; using System.Collections.Generic; namespace com.itac.oib.linecontrol.contracts.data { // source: assembly 3.2.0.152 // source: assembly ASM.AS.OIB.SIPLACEPro.LineControl.Contracts public class ComponentKnownButNotSetUpMapper { // 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.LineControl.Contracts.Data.ComponentKnownButNotSetUp get(ComponentKnownButNotSetUp itacComponentKnownButNotSetUp) { if (itacComponentKnownButNotSetUp == null) { return null; } Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp asmComponentKnownButNotSetUp = new Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp(); mapItac2Asm(asmComponentKnownButNotSetUp, itacComponentKnownButNotSetUp); return asmComponentKnownButNotSetUp; } public static void mapItac2Asm(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp asmComponentKnownButNotSetUp, ComponentKnownButNotSetUp itacComponentKnownButNotSetUp) { asmComponentKnownButNotSetUp.ComponentFullPath = itacComponentKnownButNotSetUp.ComponentFullPath; asmComponentKnownButNotSetUp.StationFullPath = itacComponentKnownButNotSetUp.StationFullPath; asmComponentKnownButNotSetUp.LocationNumber = itacComponentKnownButNotSetUp.LocationNumber; asmComponentKnownButNotSetUp.DeviceNumber = itacComponentKnownButNotSetUp.DeviceNumber; asmComponentKnownButNotSetUp.AlreadyConfirmed = itacComponentKnownButNotSetUp.AlreadyConfirmed; } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[] get(ComponentKnownButNotSetUp[] itacComponentKnownButNotSetUp) { if (itacComponentKnownButNotSetUp == null) { return null; } Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[] asmComponentKnownButNotSetUp = new Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[itacComponentKnownButNotSetUp.Length]; for (int i = 0; i < itacComponentKnownButNotSetUp.Length; i++) { // to itac array asmComponentKnownButNotSetUp[i] = ComponentKnownButNotSetUpMapper.get(itacComponentKnownButNotSetUp[i]); } return asmComponentKnownButNotSetUp; } // maps iTAC namespace conform array to ASM namespace list public static List getList(ComponentKnownButNotSetUp[] asmComponentKnownButNotSetUp) { if (asmComponentKnownButNotSetUp == null) { return null; } List itacComponentKnownButNotSetUp = new List(); for (int i = 0; i < asmComponentKnownButNotSetUp.Length; i++) { itacComponentKnownButNotSetUp.Add(ComponentKnownButNotSetUpMapper.get(asmComponentKnownButNotSetUp[i])); } return itacComponentKnownButNotSetUp; } // map type from ASM namespace to iTAC namespace public static ComponentKnownButNotSetUp get(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp asmComponentKnownButNotSetUp) { if (asmComponentKnownButNotSetUp == null) { return null; } ComponentKnownButNotSetUp itacComponentKnownButNotSetUp = new ComponentKnownButNotSetUp(); mapAsm2Itac(asmComponentKnownButNotSetUp, itacComponentKnownButNotSetUp); return itacComponentKnownButNotSetUp; } public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp asmComponentKnownButNotSetUp, ComponentKnownButNotSetUp itacComponentKnownButNotSetUp) { itacComponentKnownButNotSetUp.ComponentFullPath = asmComponentKnownButNotSetUp.ComponentFullPath; itacComponentKnownButNotSetUp.StationFullPath = asmComponentKnownButNotSetUp.StationFullPath; itacComponentKnownButNotSetUp.LocationNumber = asmComponentKnownButNotSetUp.LocationNumber; itacComponentKnownButNotSetUp.DeviceNumber = asmComponentKnownButNotSetUp.DeviceNumber; itacComponentKnownButNotSetUp.AlreadyConfirmed = asmComponentKnownButNotSetUp.AlreadyConfirmed; } // maps ASM namespace conform list to iTAC namespace array public static ComponentKnownButNotSetUp[] getArray(IList asmComponentKnownButNotSetUp) { if (asmComponentKnownButNotSetUp == null) { return null; } ComponentKnownButNotSetUp[] itacComponentKnownButNotSetUp = new ComponentKnownButNotSetUp[asmComponentKnownButNotSetUp.Count]; for (int i = 0; i < asmComponentKnownButNotSetUp.Count; i++) { itacComponentKnownButNotSetUp[i] = ComponentKnownButNotSetUpMapper.get(asmComponentKnownButNotSetUp[i]); } return itacComponentKnownButNotSetUp; } // maps ASM namespace conform array to iTAC namespace array public static ComponentKnownButNotSetUp[] getArray(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[] asmComponentKnownButNotSetUp) { if (asmComponentKnownButNotSetUp == null) { return null; } ComponentKnownButNotSetUp[] itacComponentKnownButNotSetUp = new ComponentKnownButNotSetUp[asmComponentKnownButNotSetUp.Length]; for (int i = 0; i < asmComponentKnownButNotSetUp.Length; i++) { itacComponentKnownButNotSetUp[i] = ComponentKnownButNotSetUpMapper.get(asmComponentKnownButNotSetUp[i]); } return itacComponentKnownButNotSetUp; } } }