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

108 lines
7.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 26.11.2018 13:28:02
// skip property ExtensionDataObject, declared in DekPrinterRecipeVerificationData
using System;
using System.Collections.Generic;
namespace com.itac.oib.linecontrol.contracts.data
{
// source: assembly 3.0.0.0
// source: assembly ASM.AS.OIB.Client
public class DekPrinterRecipeVerificationDataMapper
{
// 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._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData get(DekPrinterRecipeVerificationData itacDekPrinterRecipeVerificationData)
{
if (itacDekPrinterRecipeVerificationData == null) { return null; }
www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData asmDekPrinterRecipeVerificationData = new www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData();
mapItac2Asm(asmDekPrinterRecipeVerificationData, itacDekPrinterRecipeVerificationData);
return asmDekPrinterRecipeVerificationData;
}
public static void mapItac2Asm(www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData asmDekPrinterRecipeVerificationData, DekPrinterRecipeVerificationData itacDekPrinterRecipeVerificationData)
{
// skip property ExtensionDataObject, declared in DekPrinterRecipeVerificationData
asmDekPrinterRecipeVerificationData.ConveyorLane = itacDekPrinterRecipeVerificationData.ConveyorLane;
asmDekPrinterRecipeVerificationData.DateModified = itacDekPrinterRecipeVerificationData.DateModified;
asmDekPrinterRecipeVerificationData.ProductId = itacDekPrinterRecipeVerificationData.ProductId;
asmDekPrinterRecipeVerificationData.ProductName = itacDekPrinterRecipeVerificationData.ProductName;
}
// maps iTAC namespace conform array to ASM namespace array
public static www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData[] get(DekPrinterRecipeVerificationData[] itacDekPrinterRecipeVerificationData)
{
if (itacDekPrinterRecipeVerificationData == null) { return null; }
www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData[] asmDekPrinterRecipeVerificationData = new www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData[itacDekPrinterRecipeVerificationData.Length];
for (int i = 0; i < itacDekPrinterRecipeVerificationData.Length; i++)
{
// to itac array
asmDekPrinterRecipeVerificationData[i] = DekPrinterRecipeVerificationDataMapper.get(itacDekPrinterRecipeVerificationData[i]);
}
return asmDekPrinterRecipeVerificationData;
}
// maps iTAC namespace conform array to ASM namespace list
public static List<www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData> getList(DekPrinterRecipeVerificationData[] asmDekPrinterRecipeVerificationData)
{
if (asmDekPrinterRecipeVerificationData == null) { return null; }
List<www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData> itacDekPrinterRecipeVerificationData = new List<www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData>();
for (int i = 0; i < asmDekPrinterRecipeVerificationData.Length; i++)
{
itacDekPrinterRecipeVerificationData.Add(DekPrinterRecipeVerificationDataMapper.get(asmDekPrinterRecipeVerificationData[i]));
}
return itacDekPrinterRecipeVerificationData;
}
// map type from ASM namespace to iTAC namespace
public static DekPrinterRecipeVerificationData get(www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData asmDekPrinterRecipeVerificationData)
{
if (asmDekPrinterRecipeVerificationData == null) { return null; }
DekPrinterRecipeVerificationData itacDekPrinterRecipeVerificationData = new DekPrinterRecipeVerificationData();
mapAsm2Itac(asmDekPrinterRecipeVerificationData, itacDekPrinterRecipeVerificationData);
return itacDekPrinterRecipeVerificationData;
}
public static void mapAsm2Itac(www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData asmDekPrinterRecipeVerificationData, DekPrinterRecipeVerificationData itacDekPrinterRecipeVerificationData)
{
// skip property ExtensionDataObject, declared in DekPrinterRecipeVerificationData
itacDekPrinterRecipeVerificationData.ConveyorLane = asmDekPrinterRecipeVerificationData.ConveyorLane;
itacDekPrinterRecipeVerificationData.DateModified = asmDekPrinterRecipeVerificationData.DateModified;
itacDekPrinterRecipeVerificationData.ProductId = asmDekPrinterRecipeVerificationData.ProductId;
itacDekPrinterRecipeVerificationData.ProductName = asmDekPrinterRecipeVerificationData.ProductName;
}
// maps ASM namespace conform list to iTAC namespace array
public static DekPrinterRecipeVerificationData[] getArray(IList<www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData> asmDekPrinterRecipeVerificationData)
{
if (asmDekPrinterRecipeVerificationData == null) { return null; }
DekPrinterRecipeVerificationData[] itacDekPrinterRecipeVerificationData = new DekPrinterRecipeVerificationData[asmDekPrinterRecipeVerificationData.Count];
for (int i = 0; i < asmDekPrinterRecipeVerificationData.Count; i++)
{
itacDekPrinterRecipeVerificationData[i] = DekPrinterRecipeVerificationDataMapper.get(asmDekPrinterRecipeVerificationData[i]);
}
return itacDekPrinterRecipeVerificationData;
}
// maps ASM namespace conform array to iTAC namespace array
public static DekPrinterRecipeVerificationData[] getArray(www.siplace.com.OIB._2015._10.LineControlServer.Contracts.Data.DekPrinterRecipeVerificationData[] asmDekPrinterRecipeVerificationData)
{
if (asmDekPrinterRecipeVerificationData == null) { return null; }
DekPrinterRecipeVerificationData[] itacDekPrinterRecipeVerificationData = new DekPrinterRecipeVerificationData[asmDekPrinterRecipeVerificationData.Length];
for (int i = 0; i < asmDekPrinterRecipeVerificationData.Length; i++)
{
itacDekPrinterRecipeVerificationData[i] = DekPrinterRecipeVerificationDataMapper.get(asmDekPrinterRecipeVerificationData[i]);
}
return itacDekPrinterRecipeVerificationData;
}
}
}