Files
2025-06-06 09:15:13 +02:00

113 lines
5.7 KiB
C#

/*
* 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:02:34
using System;
using System.Collections.Generic;
namespace com.itac.oib.siplacesetupcenter.contracts.data
{
// source: assembly 3.2.0.152
// source: assembly ASM.AS.OIB.SIPLACESetupCenter.Contracts
public class TableLocationMapper
{
// 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.TableLocation get(TableLocation itacTableLocation)
{
if (itacTableLocation == null) { return null; }
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation asmTableLocation = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation();
mapItac2Asm(asmTableLocation, itacTableLocation);
return asmTableLocation;
}
public static void mapItac2Asm(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation asmTableLocation, TableLocation itacTableLocation)
{
asmTableLocation.TableState = itacTableLocation.TableState;
// complex property Machine, isArray:False, isGeneric:False
asmTableLocation.Machine = com.itac.oib.siplacesetupcenter.contracts.data.MachineLocatorMapper.get( itacTableLocation.Machine);
// complex property DockingStation, isArray:False, isGeneric:False
asmTableLocation.DockingStation = com.itac.oib.siplacesetupcenter.contracts.data.DockingStationMapper.get( itacTableLocation.DockingStation);
asmTableLocation.Location = itacTableLocation.Location;
asmTableLocation.TableId = itacTableLocation.TableId;
asmTableLocation.Device = itacTableLocation.Device;
}
// maps iTAC namespace conform array to ASM namespace array
public static www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation[] get(TableLocation[] itacTableLocation)
{
if (itacTableLocation == null) { return null; }
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation[] asmTableLocation = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation[itacTableLocation.Length];
for (int i = 0; i < itacTableLocation.Length; i++)
{
// to itac array
asmTableLocation[i] = TableLocationMapper.get(itacTableLocation[i]);
}
return asmTableLocation;
}
// maps iTAC namespace conform array to ASM namespace list
public static List<www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation> getList(TableLocation[] asmTableLocation)
{
if (asmTableLocation == null) { return null; }
List<www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation> itacTableLocation = new List<www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation>();
for (int i = 0; i < asmTableLocation.Length; i++)
{
itacTableLocation.Add(TableLocationMapper.get(asmTableLocation[i]));
}
return itacTableLocation;
}
// map type from ASM namespace to iTAC namespace
public static TableLocation get(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation asmTableLocation)
{
if (asmTableLocation == null) { return null; }
TableLocation itacTableLocation = new TableLocation();
mapAsm2Itac(asmTableLocation, itacTableLocation);
return itacTableLocation;
}
public static void mapAsm2Itac(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation asmTableLocation, TableLocation itacTableLocation)
{
itacTableLocation.TableState = asmTableLocation.TableState;
itacTableLocation.Machine = com.itac.oib.siplacesetupcenter.contracts.data.MachineLocatorMapper.get(asmTableLocation.Machine);
// complex asm property Machine
itacTableLocation.DockingStation = com.itac.oib.siplacesetupcenter.contracts.data.DockingStationMapper.get(asmTableLocation.DockingStation);
// complex asm property DockingStation
itacTableLocation.Location = asmTableLocation.Location;
itacTableLocation.TableId = asmTableLocation.TableId;
itacTableLocation.Device = asmTableLocation.Device;
}
// maps ASM namespace conform list to iTAC namespace array
public static TableLocation[] getArray(IList<www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation> asmTableLocation)
{
if (asmTableLocation == null) { return null; }
TableLocation[] itacTableLocation = new TableLocation[asmTableLocation.Count];
for (int i = 0; i < asmTableLocation.Count; i++)
{
itacTableLocation[i] = TableLocationMapper.get(asmTableLocation[i]);
}
return itacTableLocation;
}
// maps ASM namespace conform array to iTAC namespace array
public static TableLocation[] getArray(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.TableLocation[] asmTableLocation)
{
if (asmTableLocation == null) { return null; }
TableLocation[] itacTableLocation = new TableLocation[asmTableLocation.Length];
for (int i = 0; i < asmTableLocation.Length; i++)
{
itacTableLocation[i] = TableLocationMapper.get(asmTableLocation[i]);
}
return itacTableLocation;
}
}
}