121 lines
6.1 KiB
C#
121 lines
6.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 PrinterPrintProcess
|
|
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 PrinterPrintProcessMapper
|
|
{
|
|
// 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.PrinterPrintProcess get(PrinterPrintProcess itacPrinterPrintProcess)
|
|
{
|
|
if (itacPrinterPrintProcess == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess asmPrinterPrintProcess = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess();
|
|
mapItac2Asm(asmPrinterPrintProcess, itacPrinterPrintProcess);
|
|
return asmPrinterPrintProcess;
|
|
}
|
|
|
|
public static void mapItac2Asm(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess asmPrinterPrintProcess, PrinterPrintProcess itacPrinterPrintProcess)
|
|
{
|
|
// skip property ExtensionDataObject, declared in PrinterPrintProcess
|
|
asmPrinterPrintProcess.PrintFrontLimit = itacPrinterPrintProcess.PrintFrontLimit;
|
|
asmPrinterPrintProcess.PrintGap = itacPrinterPrintProcess.PrintGap;
|
|
asmPrinterPrintProcess.PrintRearLimit = itacPrinterPrintProcess.PrintRearLimit;
|
|
asmPrinterPrintProcess.ProcessGuid = itacPrinterPrintProcess.ProcessGuid;
|
|
asmPrinterPrintProcess.SeperationDistance = itacPrinterPrintProcess.SeperationDistance;
|
|
asmPrinterPrintProcess.SeperationSpeed = itacPrinterPrintProcess.SeperationSpeed;
|
|
// complex property Strokes, isArray:True, isGeneric:False
|
|
asmPrinterPrintProcess.Strokes = com.itac.oib.traceability.contracts.data.PrinterProcessStrokeMapper.get( itacPrinterPrintProcess.Strokes);
|
|
asmPrinterPrintProcess.PrintMode = itacPrinterPrintProcess.PrintMode;
|
|
asmPrinterPrintProcess.PrintDeposits = itacPrinterPrintProcess.PrintDeposits;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess[] get(PrinterPrintProcess[] itacPrinterPrintProcess)
|
|
{
|
|
if (itacPrinterPrintProcess == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess[] asmPrinterPrintProcess = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess[itacPrinterPrintProcess.Length];
|
|
for (int i = 0; i < itacPrinterPrintProcess.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmPrinterPrintProcess[i] = PrinterPrintProcessMapper.get(itacPrinterPrintProcess[i]);
|
|
}
|
|
return asmPrinterPrintProcess;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess> getList(PrinterPrintProcess[] asmPrinterPrintProcess)
|
|
{
|
|
if (asmPrinterPrintProcess == null) { return null; }
|
|
List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess> itacPrinterPrintProcess = new List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess>();
|
|
for (int i = 0; i < asmPrinterPrintProcess.Length; i++)
|
|
{
|
|
itacPrinterPrintProcess.Add(PrinterPrintProcessMapper.get(asmPrinterPrintProcess[i]));
|
|
}
|
|
return itacPrinterPrintProcess;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static PrinterPrintProcess get(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess asmPrinterPrintProcess)
|
|
{
|
|
if (asmPrinterPrintProcess == null) { return null; }
|
|
PrinterPrintProcess itacPrinterPrintProcess = new PrinterPrintProcess();
|
|
mapAsm2Itac(asmPrinterPrintProcess, itacPrinterPrintProcess);
|
|
return itacPrinterPrintProcess;
|
|
}
|
|
|
|
public static void mapAsm2Itac(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess asmPrinterPrintProcess, PrinterPrintProcess itacPrinterPrintProcess)
|
|
{
|
|
// skip property ExtensionDataObject, declared in PrinterPrintProcess
|
|
itacPrinterPrintProcess.PrintFrontLimit = asmPrinterPrintProcess.PrintFrontLimit;
|
|
itacPrinterPrintProcess.PrintGap = asmPrinterPrintProcess.PrintGap;
|
|
itacPrinterPrintProcess.PrintRearLimit = asmPrinterPrintProcess.PrintRearLimit;
|
|
itacPrinterPrintProcess.ProcessGuid = asmPrinterPrintProcess.ProcessGuid;
|
|
itacPrinterPrintProcess.SeperationDistance = asmPrinterPrintProcess.SeperationDistance;
|
|
itacPrinterPrintProcess.SeperationSpeed = asmPrinterPrintProcess.SeperationSpeed;
|
|
// array mapping
|
|
itacPrinterPrintProcess.Strokes = PrinterProcessStrokeMapper.getArray(asmPrinterPrintProcess.Strokes);
|
|
// complex asm property Strokes
|
|
itacPrinterPrintProcess.PrintMode = asmPrinterPrintProcess.PrintMode;
|
|
itacPrinterPrintProcess.PrintDeposits = asmPrinterPrintProcess.PrintDeposits;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static PrinterPrintProcess[] getArray(IList<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess> asmPrinterPrintProcess)
|
|
{
|
|
if (asmPrinterPrintProcess == null) { return null; }
|
|
PrinterPrintProcess[] itacPrinterPrintProcess = new PrinterPrintProcess[asmPrinterPrintProcess.Count];
|
|
for (int i = 0; i < asmPrinterPrintProcess.Count; i++)
|
|
{
|
|
itacPrinterPrintProcess[i] = PrinterPrintProcessMapper.get(asmPrinterPrintProcess[i]);
|
|
}
|
|
return itacPrinterPrintProcess;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static PrinterPrintProcess[] getArray(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrinterPrintProcess[] asmPrinterPrintProcess)
|
|
{
|
|
if (asmPrinterPrintProcess == null) { return null; }
|
|
PrinterPrintProcess[] itacPrinterPrintProcess = new PrinterPrintProcess[asmPrinterPrintProcess.Length];
|
|
for (int i = 0; i < asmPrinterPrintProcess.Length; i++)
|
|
{
|
|
itacPrinterPrintProcess[i] = PrinterPrintProcessMapper.get(asmPrinterPrintProcess[i]);
|
|
}
|
|
return itacPrinterPrintProcess;
|
|
}
|
|
}
|
|
}
|