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

110 lines
5.2 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 06.11.2018 11:07:38
using System;
using System.Collections.Generic;
namespace com.itac.oib.siplacesetupcenter.contracts.data
{
// source: assembly 5.1.0.84
// source: assembly ASM.AS.OIB.SIPLACESetupCenter.Contracts
public class PrinterToolMapper:PrinterVerificationItemMapper
{
// used for itac->asm: True
// used for asm->itac: True
// maps iTAC namespace conform type to ASM namespace type
public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool get(PrinterTool itacPrinterTool)
{
if (itacPrinterTool == null) { return null; }
Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool asmPrinterTool = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool();
mapItac2Asm(asmPrinterTool, itacPrinterTool);
return asmPrinterTool;
}
public static void mapItac2Asm(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool asmPrinterTool, PrinterTool itacPrinterTool)
{
// complex property Machine, isArray:False, isGeneric:False
asmPrinterTool.Machine = com.itac.oib.siplacesetupcenter.contracts.data.MachineLocatorMapper.get( itacPrinterTool.Machine);
asmPrinterTool.SetupPath = itacPrinterTool.SetupPath;
// complex property ProductInfo, isArray:False, isGeneric:False
asmPrinterTool.ProductInfo = com.itac.oib.siplacesetupcenter.contracts.data.ProductInfoMapper.get( itacPrinterTool.ProductInfo);
asmPrinterTool.Name = itacPrinterTool.Name;
}
// maps iTAC namespace conform array to ASM namespace array
public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool[] get(PrinterTool[] itacPrinterTool)
{
if (itacPrinterTool == null) { return null; }
Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool[] asmPrinterTool = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool[itacPrinterTool.Length];
for (int i = 0; i < itacPrinterTool.Length; i++)
{
// to itac array
asmPrinterTool[i] = PrinterToolMapper.get(itacPrinterTool[i]);
}
return asmPrinterTool;
}
// maps iTAC namespace conform array to ASM namespace list
public static List<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool> getList(PrinterTool[] asmPrinterTool)
{
if (asmPrinterTool == null) { return null; }
List<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool> itacPrinterTool = new List<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool>();
for (int i = 0; i < asmPrinterTool.Length; i++)
{
itacPrinterTool.Add(PrinterToolMapper.get(asmPrinterTool[i]));
}
return itacPrinterTool;
}
// map type from ASM namespace to iTAC namespace
public static PrinterTool get(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool asmPrinterTool)
{
if (asmPrinterTool == null) { return null; }
PrinterTool itacPrinterTool = new PrinterTool();
mapAsm2Itac(asmPrinterTool, itacPrinterTool);
return itacPrinterTool;
}
public static void mapAsm2Itac(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool asmPrinterTool, PrinterTool itacPrinterTool)
{
PrinterVerificationItemMapper.mapAsm2Itac(asmPrinterTool, itacPrinterTool);
itacPrinterTool.Machine = com.itac.oib.siplacesetupcenter.contracts.data.MachineLocatorMapper.get(asmPrinterTool.Machine);
// complex asm property Machine
itacPrinterTool.SetupPath = asmPrinterTool.SetupPath;
itacPrinterTool.ProductInfo = com.itac.oib.siplacesetupcenter.contracts.data.ProductInfoMapper.get(asmPrinterTool.ProductInfo);
// complex asm property ProductInfo
itacPrinterTool.Name = asmPrinterTool.Name;
}
// maps ASM namespace conform list to iTAC namespace array
public static PrinterTool[] getArray(IList<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool> asmPrinterTool)
{
if (asmPrinterTool == null) { return null; }
PrinterTool[] itacPrinterTool = new PrinterTool[asmPrinterTool.Count];
for (int i = 0; i < asmPrinterTool.Count; i++)
{
itacPrinterTool[i] = PrinterToolMapper.get(asmPrinterTool[i]);
}
return itacPrinterTool;
}
// maps ASM namespace conform array to iTAC namespace array
public static PrinterTool[] getArray(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PrinterTool[] asmPrinterTool)
{
if (asmPrinterTool == null) { return null; }
PrinterTool[] itacPrinterTool = new PrinterTool[asmPrinterTool.Length];
for (int i = 0; i < asmPrinterTool.Length; i++)
{
itacPrinterTool[i] = PrinterToolMapper.get(asmPrinterTool[i]);
}
return itacPrinterTool;
}
}
}