123 lines
5.4 KiB
C#
123 lines
5.4 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 05.11.2018 14:52:23
|
|
// skip property ConveyorShuttleOption, property in exclude list
|
|
// skip property ConveyorShuttleOption, property in exclude list
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.siplacepro.contracts.types;
|
|
|
|
namespace com.itac.oib.siplacepro.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.SIPLACEPro.Proxy
|
|
public class PrinterInLineMapper
|
|
{
|
|
// 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.Proxy.Business.Objects.PrinterInLine get(PrinterInLine itacPrinterInLine)
|
|
{
|
|
if (itacPrinterInLine == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine asmPrinterInLine = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine();
|
|
mapItac2Asm(asmPrinterInLine, itacPrinterInLine);
|
|
return asmPrinterInLine;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine asmPrinterInLine, PrinterInLine itacPrinterInLine)
|
|
{
|
|
asmPrinterInLine.InvertedOrientationInLine = itacPrinterInLine.InvertedOrientationInLine;
|
|
// skip readonly property DeviceInLineSpecies
|
|
// skip property ConveyorShuttleOption, property in exclude list
|
|
// skip property ConveyorShuttleOption, property in exclude list
|
|
// complex property Printer, isArray:False, isGeneric:False
|
|
itacPrinterInLine.Printer = com.itac.oib.siplacepro.contracts.data.PrinterMapper.get( asmPrinterInLine.Printer);
|
|
// skip readonly property PrinterSoftwareVersion
|
|
// skip readonly property PrinterTypeName
|
|
// skip readonly property PrinterHostName
|
|
// skip readonly property PrinterIPAddress
|
|
asmPrinterInLine.ConveyorLaneCount = itacPrinterInLine.ConveyorLaneCount;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine[] get(PrinterInLine[] itacPrinterInLine)
|
|
{
|
|
if (itacPrinterInLine == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine[] asmPrinterInLine = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine[itacPrinterInLine.Length];
|
|
for (int i = 0; i < itacPrinterInLine.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmPrinterInLine[i] = PrinterInLineMapper.get(itacPrinterInLine[i]);
|
|
}
|
|
return asmPrinterInLine;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine> getList(PrinterInLine[] asmPrinterInLine)
|
|
{
|
|
if (asmPrinterInLine == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine> itacPrinterInLine = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine>();
|
|
for (int i = 0; i < asmPrinterInLine.Length; i++)
|
|
{
|
|
itacPrinterInLine.Add(PrinterInLineMapper.get(asmPrinterInLine[i]));
|
|
}
|
|
return itacPrinterInLine;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static PrinterInLine get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine asmPrinterInLine)
|
|
{
|
|
if (asmPrinterInLine == null) { return null; }
|
|
PrinterInLine itacPrinterInLine = new PrinterInLine();
|
|
mapAsm2Itac(asmPrinterInLine, itacPrinterInLine);
|
|
return itacPrinterInLine;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine asmPrinterInLine, PrinterInLine itacPrinterInLine)
|
|
{
|
|
itacPrinterInLine.InvertedOrientationInLine = asmPrinterInLine.InvertedOrientationInLine;
|
|
itacPrinterInLine.DeviceInLineSpecies = com.itac.oib.siplacepro.contracts.types.DeviceInLineSpeciesMapper.get(asmPrinterInLine.DeviceInLineSpecies);
|
|
// complex asm property DeviceInLineSpecies
|
|
// skip property ConveyorShuttleOption, property in exclude list
|
|
// skip property ConveyorShuttleOption, property in exclude list
|
|
itacPrinterInLine.Printer = com.itac.oib.siplacepro.contracts.data.PrinterMapper.get(asmPrinterInLine.Printer);
|
|
// complex asm property Printer
|
|
itacPrinterInLine.PrinterSoftwareVersion = asmPrinterInLine.PrinterSoftwareVersion;
|
|
itacPrinterInLine.PrinterTypeName = asmPrinterInLine.PrinterTypeName;
|
|
itacPrinterInLine.PrinterHostName = asmPrinterInLine.PrinterHostName;
|
|
itacPrinterInLine.PrinterIPAddress = asmPrinterInLine.PrinterIPAddress;
|
|
itacPrinterInLine.ConveyorLaneCount = asmPrinterInLine.ConveyorLaneCount;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static PrinterInLine[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine> asmPrinterInLine)
|
|
{
|
|
if (asmPrinterInLine == null) { return null; }
|
|
PrinterInLine[] itacPrinterInLine = new PrinterInLine[asmPrinterInLine.Count];
|
|
for (int i = 0; i < asmPrinterInLine.Count; i++)
|
|
{
|
|
itacPrinterInLine[i] = PrinterInLineMapper.get(asmPrinterInLine[i]);
|
|
}
|
|
return itacPrinterInLine;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static PrinterInLine[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PrinterInLine[] asmPrinterInLine)
|
|
{
|
|
if (asmPrinterInLine == null) { return null; }
|
|
PrinterInLine[] itacPrinterInLine = new PrinterInLine[asmPrinterInLine.Length];
|
|
for (int i = 0; i < asmPrinterInLine.Length; i++)
|
|
{
|
|
itacPrinterInLine[i] = PrinterInLineMapper.get(asmPrinterInLine[i]);
|
|
}
|
|
return itacPrinterInLine;
|
|
}
|
|
}
|
|
}
|