140 lines
6.2 KiB
C#
140 lines
6.2 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
|
|
// skip property NamedObjectBase, declared in Board
|
|
// skip property Boolean, property in exclude list
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
// skip property EnforcedFiducialCount, declared in Board
|
|
// skip property ListProxy`1, property in exclude list
|
|
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 BoardMapper
|
|
{
|
|
// 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.Board get(Board itacBoard)
|
|
{
|
|
if (itacBoard == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board asmBoard = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board();
|
|
mapItac2Asm(asmBoard, itacBoard);
|
|
return asmBoard;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board asmBoard, Board itacBoard)
|
|
{
|
|
// skip property NamedObjectBase, declared in Board
|
|
asmBoard.Comment = itacBoard.Comment;
|
|
// skip property Boolean, property in exclude list
|
|
// skip readonly property TopSide
|
|
// skip readonly property BottomSide
|
|
asmBoard.Length = itacBoard.Length;
|
|
asmBoard.Width = itacBoard.Width;
|
|
asmBoard.Height = itacBoard.Height;
|
|
asmBoard.IsWorkHoldingDevice = itacBoard.IsWorkHoldingDevice;
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
asmBoard.UsePanelOffsetForInkspots = itacBoard.UsePanelOffsetForInkspots;
|
|
asmBoard.RequiresTraceInformation = itacBoard.RequiresTraceInformation;
|
|
asmBoard.RequiresPCBBarcodeForTraceability = itacBoard.RequiresPCBBarcodeForTraceability;
|
|
// skip property EnforcedFiducialCount, declared in Board
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip readonly property IsAnyPanelInkspotPresent
|
|
// skip readonly property Name
|
|
// skip readonly property FullPath
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board[] get(Board[] itacBoard)
|
|
{
|
|
if (itacBoard == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board[] asmBoard = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board[itacBoard.Length];
|
|
for (int i = 0; i < itacBoard.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmBoard[i] = BoardMapper.get(itacBoard[i]);
|
|
}
|
|
return asmBoard;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board> getList(Board[] asmBoard)
|
|
{
|
|
if (asmBoard == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board> itacBoard = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board>();
|
|
for (int i = 0; i < asmBoard.Length; i++)
|
|
{
|
|
itacBoard.Add(BoardMapper.get(asmBoard[i]));
|
|
}
|
|
return itacBoard;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static Board get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board asmBoard)
|
|
{
|
|
if (asmBoard == null) { return null; }
|
|
Board itacBoard = new Board();
|
|
mapAsm2Itac(asmBoard, itacBoard);
|
|
return itacBoard;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board asmBoard, Board itacBoard)
|
|
{
|
|
// skip property NamedObjectBase, declared in Board
|
|
itacBoard.Comment = asmBoard.Comment;
|
|
// skip property Boolean, property in exclude list
|
|
itacBoard.TopSide = com.itac.oib.siplacepro.contracts.data.BoardSideMapper.get(asmBoard.TopSide);
|
|
// complex asm property TopSide
|
|
itacBoard.BottomSide = com.itac.oib.siplacepro.contracts.data.BoardSideMapper.get(asmBoard.BottomSide);
|
|
// complex asm property BottomSide
|
|
itacBoard.Length = asmBoard.Length;
|
|
itacBoard.Width = asmBoard.Width;
|
|
itacBoard.Height = asmBoard.Height;
|
|
itacBoard.IsWorkHoldingDevice = asmBoard.IsWorkHoldingDevice;
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
itacBoard.UsePanelOffsetForInkspots = asmBoard.UsePanelOffsetForInkspots;
|
|
itacBoard.RequiresTraceInformation = asmBoard.RequiresTraceInformation;
|
|
itacBoard.RequiresPCBBarcodeForTraceability = asmBoard.RequiresPCBBarcodeForTraceability;
|
|
// skip property EnforcedFiducialCount, declared in Board
|
|
// skip property ListProxy`1, property in exclude list
|
|
itacBoard.IsAnyPanelInkspotPresent = asmBoard.IsAnyPanelInkspotPresent;
|
|
itacBoard.Name = asmBoard.Name;
|
|
itacBoard.FullPath = asmBoard.FullPath;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static Board[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board> asmBoard)
|
|
{
|
|
if (asmBoard == null) { return null; }
|
|
Board[] itacBoard = new Board[asmBoard.Count];
|
|
for (int i = 0; i < asmBoard.Count; i++)
|
|
{
|
|
itacBoard[i] = BoardMapper.get(asmBoard[i]);
|
|
}
|
|
return itacBoard;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static Board[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Board[] asmBoard)
|
|
{
|
|
if (asmBoard == null) { return null; }
|
|
Board[] itacBoard = new Board[asmBoard.Length];
|
|
for (int i = 0; i < asmBoard.Length; i++)
|
|
{
|
|
itacBoard[i] = BoardMapper.get(asmBoard[i]);
|
|
}
|
|
return itacBoard;
|
|
}
|
|
}
|
|
}
|