/* * 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 02.11.2018 09:19:35 using System; using System.Collections.Generic; namespace com.itac.oib.linecontrol.contracts.data { // source: assembly 5.1.0.84 // 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 asmComponentKnownButNotSetUp) { if (asmComponentKnownButNotSetUp == null) { return null; } Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp itacComponentKnownButNotSetUp = new Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp(); mapItac2Asm(itacComponentKnownButNotSetUp, asmComponentKnownButNotSetUp); return itacComponentKnownButNotSetUp; } public static void mapItac2Asm(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp itacComponentKnownButNotSetUp, ComponentKnownButNotSetUp asmComponentKnownButNotSetUp) { itacComponentKnownButNotSetUp.ComponentFullPath = asmComponentKnownButNotSetUp.ComponentFullPath; itacComponentKnownButNotSetUp.StationFullPath = asmComponentKnownButNotSetUp.StationFullPath; itacComponentKnownButNotSetUp.LocationNumber = asmComponentKnownButNotSetUp.LocationNumber; itacComponentKnownButNotSetUp.DeviceNumber = asmComponentKnownButNotSetUp.DeviceNumber; itacComponentKnownButNotSetUp.AlreadyConfirmed = asmComponentKnownButNotSetUp.AlreadyConfirmed; } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[] get(ComponentKnownButNotSetUp[] asmComponentKnownButNotSetUp) { if (asmComponentKnownButNotSetUp == null) { return null; } Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[] itacComponentKnownButNotSetUp = new Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentKnownButNotSetUp[asmComponentKnownButNotSetUp.Length]; for (int i = 0; i < asmComponentKnownButNotSetUp.Length; i++) { // to itac array itacComponentKnownButNotSetUp[i] = ComponentKnownButNotSetUpMapper.get(asmComponentKnownButNotSetUp[i]); } return itacComponentKnownButNotSetUp; } // 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; } } }