106 lines
5.1 KiB
C#
106 lines
5.1 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 15:39:46
|
|
// skip property ExtensionDataObject, declared in PrinterPrintDeviation
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.traceability.contracts.data
|
|
{
|
|
// source: assembly 3.0.0.0
|
|
// source: assembly ASM.AS.OIB.Client
|
|
public class PrinterPrintDeviationMapper
|
|
{
|
|
// 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._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation get(PrinterPrintDeviation itacPrinterPrintDeviation)
|
|
{
|
|
if (itacPrinterPrintDeviation == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation asmPrinterPrintDeviation = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation();
|
|
mapItac2Asm(asmPrinterPrintDeviation, itacPrinterPrintDeviation);
|
|
return asmPrinterPrintDeviation;
|
|
}
|
|
|
|
public static void mapItac2Asm(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation asmPrinterPrintDeviation, PrinterPrintDeviation itacPrinterPrintDeviation)
|
|
{
|
|
// skip property ExtensionDataObject, declared in PrinterPrintDeviation
|
|
asmPrinterPrintDeviation.Theta = itacPrinterPrintDeviation.Theta;
|
|
asmPrinterPrintDeviation.Xoffset = itacPrinterPrintDeviation.Xoffset;
|
|
asmPrinterPrintDeviation.Yoffset = itacPrinterPrintDeviation.Yoffset;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation[] get(PrinterPrintDeviation[] itacPrinterPrintDeviation)
|
|
{
|
|
if (itacPrinterPrintDeviation == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation[] asmPrinterPrintDeviation = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation[itacPrinterPrintDeviation.Length];
|
|
for (int i = 0; i < itacPrinterPrintDeviation.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmPrinterPrintDeviation[i] = PrinterPrintDeviationMapper.get(itacPrinterPrintDeviation[i]);
|
|
}
|
|
return asmPrinterPrintDeviation;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation> getList(PrinterPrintDeviation[] asmPrinterPrintDeviation)
|
|
{
|
|
if (asmPrinterPrintDeviation == null) { return null; }
|
|
List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation> itacPrinterPrintDeviation = new List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation>();
|
|
for (int i = 0; i < asmPrinterPrintDeviation.Length; i++)
|
|
{
|
|
itacPrinterPrintDeviation.Add(PrinterPrintDeviationMapper.get(asmPrinterPrintDeviation[i]));
|
|
}
|
|
return itacPrinterPrintDeviation;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static PrinterPrintDeviation get(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation asmPrinterPrintDeviation)
|
|
{
|
|
if (asmPrinterPrintDeviation == null) { return null; }
|
|
PrinterPrintDeviation itacPrinterPrintDeviation = new PrinterPrintDeviation();
|
|
mapAsm2Itac(asmPrinterPrintDeviation, itacPrinterPrintDeviation);
|
|
return itacPrinterPrintDeviation;
|
|
}
|
|
|
|
public static void mapAsm2Itac(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation asmPrinterPrintDeviation, PrinterPrintDeviation itacPrinterPrintDeviation)
|
|
{
|
|
// skip property ExtensionDataObject, declared in PrinterPrintDeviation
|
|
itacPrinterPrintDeviation.Theta = asmPrinterPrintDeviation.Theta;
|
|
itacPrinterPrintDeviation.Xoffset = asmPrinterPrintDeviation.Xoffset;
|
|
itacPrinterPrintDeviation.Yoffset = asmPrinterPrintDeviation.Yoffset;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static PrinterPrintDeviation[] getArray(IList<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation> asmPrinterPrintDeviation)
|
|
{
|
|
if (asmPrinterPrintDeviation == null) { return null; }
|
|
PrinterPrintDeviation[] itacPrinterPrintDeviation = new PrinterPrintDeviation[asmPrinterPrintDeviation.Count];
|
|
for (int i = 0; i < asmPrinterPrintDeviation.Count; i++)
|
|
{
|
|
itacPrinterPrintDeviation[i] = PrinterPrintDeviationMapper.get(asmPrinterPrintDeviation[i]);
|
|
}
|
|
return itacPrinterPrintDeviation;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static PrinterPrintDeviation[] getArray(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintDeviation[] asmPrinterPrintDeviation)
|
|
{
|
|
if (asmPrinterPrintDeviation == null) { return null; }
|
|
PrinterPrintDeviation[] itacPrinterPrintDeviation = new PrinterPrintDeviation[asmPrinterPrintDeviation.Length];
|
|
for (int i = 0; i < asmPrinterPrintDeviation.Length; i++)
|
|
{
|
|
itacPrinterPrintDeviation[i] = PrinterPrintDeviationMapper.get(asmPrinterPrintDeviation[i]);
|
|
}
|
|
return itacPrinterPrintDeviation;
|
|
}
|
|
}
|
|
}
|