145 lines
7.9 KiB
C#
145 lines
7.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 23.11.2018 08:08:14
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.siplacepro.contracts.types;
|
|
|
|
namespace com.itac.oib.siplacepro.contracts.data
|
|
{
|
|
// source: assembly 3.2.0.152
|
|
// source: assembly ASM.AS.OIB.SIPLACEPro.Proxy
|
|
public class BoardElementMapper
|
|
{
|
|
// 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.BoardElement get(BoardElement itacBoardElement)
|
|
{
|
|
if (itacBoardElement == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement asmBoardElement = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement();
|
|
mapItac2Asm(asmBoardElement, itacBoardElement);
|
|
return asmBoardElement;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement asmBoardElement, BoardElement itacBoardElement)
|
|
{
|
|
// complex property Board, isArray:False, isGeneric:False
|
|
asmBoardElement.Board = com.itac.oib.siplacepro.contracts.data.BoardMapper.get( itacBoardElement.Board);
|
|
// complex property BoardSideProduced, isArray:False, isGeneric:False
|
|
asmBoardElement.BoardSideProduced = com.itac.oib.siplacepro.contracts.types.BoardSideMapper.get( itacBoardElement.BoardSideProduced);
|
|
// complex property BoardOrientation, isArray:False, isGeneric:False
|
|
asmBoardElement.BoardOrientation = com.itac.oib.siplacepro.contracts.types.BoardOrientationMapper.get( itacBoardElement.BoardOrientation);
|
|
asmBoardElement.ExplicitOffsetX = itacBoardElement.ExplicitOffsetX;
|
|
asmBoardElement.ExplicitOffsetY = itacBoardElement.ExplicitOffsetY;
|
|
asmBoardElement.ExplicitOffsetZ = itacBoardElement.ExplicitOffsetZ;
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
// complex property BoardElementOffsetMode, isArray:False, isGeneric:False
|
|
asmBoardElement.BoardElementOffsetMode = com.itac.oib.siplacepro.contracts.types.BoardElementOffsetModeMapper.get( itacBoardElement.BoardElementOffsetMode);
|
|
// skip property Double, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
asmBoardElement.OffsetZ = itacBoardElement.OffsetZ;
|
|
// skip readonly property XDimension
|
|
// skip readonly property YDimension
|
|
// complex property SubLaneId, isArray:False, isGeneric:False
|
|
asmBoardElement.SubLaneId = com.itac.oib.siplacepro.contracts.types.ConveyorSubLaneTypeMapper.get( itacBoardElement.SubLaneId);
|
|
// skip readonly property AssembledPCBCountString
|
|
// skip readonly property AssembledPCBCount
|
|
// skip readonly property HasAssembledPCBMarkers
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement[] get(BoardElement[] itacBoardElement)
|
|
{
|
|
if (itacBoardElement == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement[] asmBoardElement = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement[itacBoardElement.Length];
|
|
for (int i = 0; i < itacBoardElement.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmBoardElement[i] = BoardElementMapper.get(itacBoardElement[i]);
|
|
}
|
|
return asmBoardElement;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement> getList(BoardElement[] asmBoardElement)
|
|
{
|
|
if (asmBoardElement == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement> itacBoardElement = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement>();
|
|
for (int i = 0; i < asmBoardElement.Length; i++)
|
|
{
|
|
itacBoardElement.Add(BoardElementMapper.get(asmBoardElement[i]));
|
|
}
|
|
return itacBoardElement;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static BoardElement get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement asmBoardElement)
|
|
{
|
|
if (asmBoardElement == null) { return null; }
|
|
BoardElement itacBoardElement = new BoardElement();
|
|
mapAsm2Itac(asmBoardElement, itacBoardElement);
|
|
return itacBoardElement;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement asmBoardElement, BoardElement itacBoardElement)
|
|
{
|
|
itacBoardElement.Board = com.itac.oib.siplacepro.contracts.data.BoardMapper.get(asmBoardElement.Board);
|
|
// complex asm property Board
|
|
itacBoardElement.BoardSideProduced = com.itac.oib.siplacepro.contracts.types.BoardSideMapper.get(asmBoardElement.BoardSideProduced);
|
|
// complex asm property BoardSideProduced
|
|
itacBoardElement.BoardOrientation = com.itac.oib.siplacepro.contracts.types.BoardOrientationMapper.get(asmBoardElement.BoardOrientation);
|
|
// complex asm property BoardOrientation
|
|
itacBoardElement.ExplicitOffsetX = asmBoardElement.ExplicitOffsetX;
|
|
itacBoardElement.ExplicitOffsetY = asmBoardElement.ExplicitOffsetY;
|
|
itacBoardElement.ExplicitOffsetZ = asmBoardElement.ExplicitOffsetZ;
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
itacBoardElement.BoardElementOffsetMode = com.itac.oib.siplacepro.contracts.types.BoardElementOffsetModeMapper.get(asmBoardElement.BoardElementOffsetMode);
|
|
// complex asm property BoardElementOffsetMode
|
|
// skip property Double, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
itacBoardElement.OffsetZ = asmBoardElement.OffsetZ;
|
|
itacBoardElement.XDimension = asmBoardElement.XDimension;
|
|
itacBoardElement.YDimension = asmBoardElement.YDimension;
|
|
itacBoardElement.SubLaneId = com.itac.oib.siplacepro.contracts.types.ConveyorSubLaneTypeMapper.get(asmBoardElement.SubLaneId);
|
|
// complex asm property SubLaneId
|
|
itacBoardElement.AssembledPCBCountString = asmBoardElement.AssembledPCBCountString;
|
|
itacBoardElement.AssembledPCBCount = asmBoardElement.AssembledPCBCount;
|
|
itacBoardElement.HasAssembledPCBMarkers = asmBoardElement.HasAssembledPCBMarkers;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static BoardElement[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement> asmBoardElement)
|
|
{
|
|
if (asmBoardElement == null) { return null; }
|
|
BoardElement[] itacBoardElement = new BoardElement[asmBoardElement.Count];
|
|
for (int i = 0; i < asmBoardElement.Count; i++)
|
|
{
|
|
itacBoardElement[i] = BoardElementMapper.get(asmBoardElement[i]);
|
|
}
|
|
return itacBoardElement;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static BoardElement[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardElement[] asmBoardElement)
|
|
{
|
|
if (asmBoardElement == null) { return null; }
|
|
BoardElement[] itacBoardElement = new BoardElement[asmBoardElement.Length];
|
|
for (int i = 0; i < asmBoardElement.Length; i++)
|
|
{
|
|
itacBoardElement[i] = BoardElementMapper.get(asmBoardElement[i]);
|
|
}
|
|
return itacBoardElement;
|
|
}
|
|
}
|
|
}
|