109 lines
4.9 KiB
C#
109 lines
4.9 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
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.siplacepro.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.SIPLACEPro.Proxy
|
|
public class DownloadDataMapper
|
|
{
|
|
// 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.DownloadData get(DownloadData itacDownloadData)
|
|
{
|
|
if (itacDownloadData == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData asmDownloadData = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData();
|
|
mapItac2Asm(asmDownloadData, itacDownloadData);
|
|
return asmDownloadData;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData asmDownloadData, DownloadData itacDownloadData)
|
|
{
|
|
// complex property LastDownloadRecipeData1, isArray:False, isGeneric:False
|
|
itacDownloadData.LastDownloadRecipeData1 = com.itac.oib.siplacepro.contracts.data.LastDownloadRecipeDataMapper.get( asmDownloadData.LastDownloadRecipeData1);
|
|
// complex property LastDownloadRecipeData2, isArray:False, isGeneric:False
|
|
itacDownloadData.LastDownloadRecipeData2 = com.itac.oib.siplacepro.contracts.data.LastDownloadRecipeDataMapper.get( asmDownloadData.LastDownloadRecipeData2);
|
|
// complex property LastDownloadSetupData, isArray:False, isGeneric:False
|
|
itacDownloadData.LastDownloadSetupData = com.itac.oib.siplacepro.contracts.data.LastDownloadSetupDataMapper.get( asmDownloadData.LastDownloadSetupData);
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData[] get(DownloadData[] itacDownloadData)
|
|
{
|
|
if (itacDownloadData == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData[] asmDownloadData = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData[itacDownloadData.Length];
|
|
for (int i = 0; i < itacDownloadData.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmDownloadData[i] = DownloadDataMapper.get(itacDownloadData[i]);
|
|
}
|
|
return asmDownloadData;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData> getList(DownloadData[] asmDownloadData)
|
|
{
|
|
if (asmDownloadData == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData> itacDownloadData = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData>();
|
|
for (int i = 0; i < asmDownloadData.Length; i++)
|
|
{
|
|
itacDownloadData.Add(DownloadDataMapper.get(asmDownloadData[i]));
|
|
}
|
|
return itacDownloadData;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static DownloadData get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData asmDownloadData)
|
|
{
|
|
if (asmDownloadData == null) { return null; }
|
|
DownloadData itacDownloadData = new DownloadData();
|
|
mapAsm2Itac(asmDownloadData, itacDownloadData);
|
|
return itacDownloadData;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData asmDownloadData, DownloadData itacDownloadData)
|
|
{
|
|
itacDownloadData.LastDownloadRecipeData1 = com.itac.oib.siplacepro.contracts.data.LastDownloadRecipeDataMapper.get(asmDownloadData.LastDownloadRecipeData1);
|
|
// complex asm property LastDownloadRecipeData1
|
|
itacDownloadData.LastDownloadRecipeData2 = com.itac.oib.siplacepro.contracts.data.LastDownloadRecipeDataMapper.get(asmDownloadData.LastDownloadRecipeData2);
|
|
// complex asm property LastDownloadRecipeData2
|
|
itacDownloadData.LastDownloadSetupData = com.itac.oib.siplacepro.contracts.data.LastDownloadSetupDataMapper.get(asmDownloadData.LastDownloadSetupData);
|
|
// complex asm property LastDownloadSetupData
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static DownloadData[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData> asmDownloadData)
|
|
{
|
|
if (asmDownloadData == null) { return null; }
|
|
DownloadData[] itacDownloadData = new DownloadData[asmDownloadData.Count];
|
|
for (int i = 0; i < asmDownloadData.Count; i++)
|
|
{
|
|
itacDownloadData[i] = DownloadDataMapper.get(asmDownloadData[i]);
|
|
}
|
|
return itacDownloadData;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static DownloadData[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.DownloadData[] asmDownloadData)
|
|
{
|
|
if (asmDownloadData == null) { return null; }
|
|
DownloadData[] itacDownloadData = new DownloadData[asmDownloadData.Length];
|
|
for (int i = 0; i < asmDownloadData.Length; i++)
|
|
{
|
|
itacDownloadData[i] = DownloadDataMapper.get(asmDownloadData[i]);
|
|
}
|
|
return itacDownloadData;
|
|
}
|
|
}
|
|
}
|