105 lines
4.3 KiB
C#
105 lines
4.3 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 PrePlacement
|
|
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 PrePlacementMapper
|
|
{
|
|
// 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.PrePlacement get(PrePlacement itacPrePlacement)
|
|
{
|
|
if (itacPrePlacement == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement asmPrePlacement = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement();
|
|
mapItac2Asm(asmPrePlacement, itacPrePlacement);
|
|
return asmPrePlacement;
|
|
}
|
|
|
|
public static void mapItac2Asm(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement asmPrePlacement, PrePlacement itacPrePlacement)
|
|
{
|
|
// skip property ExtensionDataObject, declared in PrePlacement
|
|
// complex property Printers, isArray:True, isGeneric:False
|
|
asmPrePlacement.Printers = com.itac.oib.traceability.contracts.data.PrinterDataMapper.get( itacPrePlacement.Printers);
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement[] get(PrePlacement[] itacPrePlacement)
|
|
{
|
|
if (itacPrePlacement == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement[] asmPrePlacement = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement[itacPrePlacement.Length];
|
|
for (int i = 0; i < itacPrePlacement.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmPrePlacement[i] = PrePlacementMapper.get(itacPrePlacement[i]);
|
|
}
|
|
return asmPrePlacement;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement> getList(PrePlacement[] asmPrePlacement)
|
|
{
|
|
if (asmPrePlacement == null) { return null; }
|
|
List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement> itacPrePlacement = new List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement>();
|
|
for (int i = 0; i < asmPrePlacement.Length; i++)
|
|
{
|
|
itacPrePlacement.Add(PrePlacementMapper.get(asmPrePlacement[i]));
|
|
}
|
|
return itacPrePlacement;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static PrePlacement get(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement asmPrePlacement)
|
|
{
|
|
if (asmPrePlacement == null) { return null; }
|
|
PrePlacement itacPrePlacement = new PrePlacement();
|
|
mapAsm2Itac(asmPrePlacement, itacPrePlacement);
|
|
return itacPrePlacement;
|
|
}
|
|
|
|
public static void mapAsm2Itac(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement asmPrePlacement, PrePlacement itacPrePlacement)
|
|
{
|
|
// skip property ExtensionDataObject, declared in PrePlacement
|
|
// array mapping
|
|
itacPrePlacement.Printers = PrinterDataMapper.getArray(asmPrePlacement.Printers);
|
|
// complex asm property Printers
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static PrePlacement[] getArray(IList<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement> asmPrePlacement)
|
|
{
|
|
if (asmPrePlacement == null) { return null; }
|
|
PrePlacement[] itacPrePlacement = new PrePlacement[asmPrePlacement.Count];
|
|
for (int i = 0; i < asmPrePlacement.Count; i++)
|
|
{
|
|
itacPrePlacement[i] = PrePlacementMapper.get(asmPrePlacement[i]);
|
|
}
|
|
return itacPrePlacement;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static PrePlacement[] getArray(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.PrePlacement[] asmPrePlacement)
|
|
{
|
|
if (asmPrePlacement == null) { return null; }
|
|
PrePlacement[] itacPrePlacement = new PrePlacement[asmPrePlacement.Length];
|
|
for (int i = 0; i < asmPrePlacement.Length; i++)
|
|
{
|
|
itacPrePlacement[i] = PrePlacementMapper.get(asmPrePlacement[i]);
|
|
}
|
|
return itacPrePlacement;
|
|
}
|
|
}
|
|
}
|