113 lines
7.0 KiB
C#
113 lines
7.0 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: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 ComponentSetUpOnWrongTableMapper
|
|
{
|
|
// 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.ComponentSetUpOnWrongTable get(ComponentSetUpOnWrongTable itacComponentSetUpOnWrongTable)
|
|
{
|
|
if (itacComponentSetUpOnWrongTable == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable asmComponentSetUpOnWrongTable = new Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable();
|
|
mapItac2Asm(asmComponentSetUpOnWrongTable, itacComponentSetUpOnWrongTable);
|
|
return asmComponentSetUpOnWrongTable;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable asmComponentSetUpOnWrongTable, ComponentSetUpOnWrongTable itacComponentSetUpOnWrongTable)
|
|
{
|
|
asmComponentSetUpOnWrongTable.ComponentFullPath = itacComponentSetUpOnWrongTable.ComponentFullPath;
|
|
asmComponentSetUpOnWrongTable.ActualStationFullPath = itacComponentSetUpOnWrongTable.ActualStationFullPath;
|
|
asmComponentSetUpOnWrongTable.ActualLocationNumber = itacComponentSetUpOnWrongTable.ActualLocationNumber;
|
|
asmComponentSetUpOnWrongTable.ActualDeviceNumber = itacComponentSetUpOnWrongTable.ActualDeviceNumber;
|
|
asmComponentSetUpOnWrongTable.StationFullPath = itacComponentSetUpOnWrongTable.StationFullPath;
|
|
asmComponentSetUpOnWrongTable.LocationNumber = itacComponentSetUpOnWrongTable.LocationNumber;
|
|
asmComponentSetUpOnWrongTable.DeviceNumber = itacComponentSetUpOnWrongTable.DeviceNumber;
|
|
asmComponentSetUpOnWrongTable.AlreadyConfirmed = itacComponentSetUpOnWrongTable.AlreadyConfirmed;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable[] get(ComponentSetUpOnWrongTable[] itacComponentSetUpOnWrongTable)
|
|
{
|
|
if (itacComponentSetUpOnWrongTable == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable[] asmComponentSetUpOnWrongTable = new Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable[itacComponentSetUpOnWrongTable.Length];
|
|
for (int i = 0; i < itacComponentSetUpOnWrongTable.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmComponentSetUpOnWrongTable[i] = ComponentSetUpOnWrongTableMapper.get(itacComponentSetUpOnWrongTable[i]);
|
|
}
|
|
return asmComponentSetUpOnWrongTable;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable> getList(ComponentSetUpOnWrongTable[] asmComponentSetUpOnWrongTable)
|
|
{
|
|
if (asmComponentSetUpOnWrongTable == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable> itacComponentSetUpOnWrongTable = new List<Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable>();
|
|
for (int i = 0; i < asmComponentSetUpOnWrongTable.Length; i++)
|
|
{
|
|
itacComponentSetUpOnWrongTable.Add(ComponentSetUpOnWrongTableMapper.get(asmComponentSetUpOnWrongTable[i]));
|
|
}
|
|
return itacComponentSetUpOnWrongTable;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static ComponentSetUpOnWrongTable get(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable asmComponentSetUpOnWrongTable)
|
|
{
|
|
if (asmComponentSetUpOnWrongTable == null) { return null; }
|
|
ComponentSetUpOnWrongTable itacComponentSetUpOnWrongTable = new ComponentSetUpOnWrongTable();
|
|
mapAsm2Itac(asmComponentSetUpOnWrongTable, itacComponentSetUpOnWrongTable);
|
|
return itacComponentSetUpOnWrongTable;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable asmComponentSetUpOnWrongTable, ComponentSetUpOnWrongTable itacComponentSetUpOnWrongTable)
|
|
{
|
|
itacComponentSetUpOnWrongTable.ComponentFullPath = asmComponentSetUpOnWrongTable.ComponentFullPath;
|
|
itacComponentSetUpOnWrongTable.ActualStationFullPath = asmComponentSetUpOnWrongTable.ActualStationFullPath;
|
|
itacComponentSetUpOnWrongTable.ActualLocationNumber = asmComponentSetUpOnWrongTable.ActualLocationNumber;
|
|
itacComponentSetUpOnWrongTable.ActualDeviceNumber = asmComponentSetUpOnWrongTable.ActualDeviceNumber;
|
|
itacComponentSetUpOnWrongTable.StationFullPath = asmComponentSetUpOnWrongTable.StationFullPath;
|
|
itacComponentSetUpOnWrongTable.LocationNumber = asmComponentSetUpOnWrongTable.LocationNumber;
|
|
itacComponentSetUpOnWrongTable.DeviceNumber = asmComponentSetUpOnWrongTable.DeviceNumber;
|
|
itacComponentSetUpOnWrongTable.AlreadyConfirmed = asmComponentSetUpOnWrongTable.AlreadyConfirmed;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static ComponentSetUpOnWrongTable[] getArray(IList<Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable> asmComponentSetUpOnWrongTable)
|
|
{
|
|
if (asmComponentSetUpOnWrongTable == null) { return null; }
|
|
ComponentSetUpOnWrongTable[] itacComponentSetUpOnWrongTable = new ComponentSetUpOnWrongTable[asmComponentSetUpOnWrongTable.Count];
|
|
for (int i = 0; i < asmComponentSetUpOnWrongTable.Count; i++)
|
|
{
|
|
itacComponentSetUpOnWrongTable[i] = ComponentSetUpOnWrongTableMapper.get(asmComponentSetUpOnWrongTable[i]);
|
|
}
|
|
return itacComponentSetUpOnWrongTable;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static ComponentSetUpOnWrongTable[] getArray(Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.ComponentSetUpOnWrongTable[] asmComponentSetUpOnWrongTable)
|
|
{
|
|
if (asmComponentSetUpOnWrongTable == null) { return null; }
|
|
ComponentSetUpOnWrongTable[] itacComponentSetUpOnWrongTable = new ComponentSetUpOnWrongTable[asmComponentSetUpOnWrongTable.Length];
|
|
for (int i = 0; i < asmComponentSetUpOnWrongTable.Length; i++)
|
|
{
|
|
itacComponentSetUpOnWrongTable[i] = ComponentSetUpOnWrongTableMapper.get(asmComponentSetUpOnWrongTable[i]);
|
|
}
|
|
return itacComponentSetUpOnWrongTable;
|
|
}
|
|
}
|
|
}
|