initialize
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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 02.11.2018 12:04:42
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using com.itac.oib.siplacepro.contracts.data;
|
||||
using com.itac.oib.siplacepro.contracts.types;
|
||||
|
||||
namespace com.itac.oib.client.customextensions
|
||||
{
|
||||
// source: assembly 3.0.0.0
|
||||
// source: assembly ASM.AS.OIB.Client.CustomExtensions
|
||||
public class ConveyorInfoMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static Asm.As.Oib.Client.CustomExtensions.ConveyorInfo get(ConveyorInfo asmConveyorInfo)
|
||||
{
|
||||
if (asmConveyorInfo == null) { return null; }
|
||||
Asm.As.Oib.Client.CustomExtensions.ConveyorInfo itacConveyorInfo = new Asm.As.Oib.Client.CustomExtensions.ConveyorInfo();
|
||||
mapItac2Asm(itacConveyorInfo, asmConveyorInfo);
|
||||
return itacConveyorInfo;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(Asm.As.Oib.Client.CustomExtensions.ConveyorInfo itacConveyorInfo, ConveyorInfo asmConveyorInfo)
|
||||
{
|
||||
// property LineJobGuid is readonly(no set method)
|
||||
// property OrderId is readonly(no set method)
|
||||
// property Recipe is readonly(no set method)
|
||||
// property Board is readonly(no set method)
|
||||
// property BoardSide is readonly(no set method)
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static Asm.As.Oib.Client.CustomExtensions.ConveyorInfo[] get(ConveyorInfo[] asmConveyorInfo)
|
||||
{
|
||||
if (asmConveyorInfo == null) { return null; }
|
||||
Asm.As.Oib.Client.CustomExtensions.ConveyorInfo[] itacConveyorInfo = new Asm.As.Oib.Client.CustomExtensions.ConveyorInfo[asmConveyorInfo.Length];
|
||||
for (int i = 0; i < asmConveyorInfo.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
itacConveyorInfo[i] = ConveyorInfoMapper.get(asmConveyorInfo[i]);
|
||||
}
|
||||
return itacConveyorInfo;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<Asm.As.Oib.Client.CustomExtensions.ConveyorInfo> getList(ConveyorInfo[] asmConveyorInfo)
|
||||
{
|
||||
if (asmConveyorInfo == null) { return null; }
|
||||
List<Asm.As.Oib.Client.CustomExtensions.ConveyorInfo> itacConveyorInfo = new List<Asm.As.Oib.Client.CustomExtensions.ConveyorInfo>();
|
||||
for (int i = 0; i < asmConveyorInfo.Length; i++)
|
||||
{
|
||||
itacConveyorInfo.Add(ConveyorInfoMapper.get(asmConveyorInfo[i]));
|
||||
}
|
||||
return itacConveyorInfo;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static ConveyorInfo get(Asm.As.Oib.Client.CustomExtensions.ConveyorInfo asmConveyorInfo)
|
||||
{
|
||||
if (asmConveyorInfo == null) { return null; }
|
||||
ConveyorInfo itacConveyorInfo = new ConveyorInfo();
|
||||
mapAsm2Itac(asmConveyorInfo, itacConveyorInfo);
|
||||
return itacConveyorInfo;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(Asm.As.Oib.Client.CustomExtensions.ConveyorInfo asmConveyorInfo, ConveyorInfo itacConveyorInfo)
|
||||
{
|
||||
itacConveyorInfo.LineJobGuid = asmConveyorInfo.LineJobGuid;
|
||||
itacConveyorInfo.OrderId = asmConveyorInfo.OrderId;
|
||||
itacConveyorInfo.Recipe = com.itac.oib.siplacepro.contracts.data.RecipeMapper.get(asmConveyorInfo.Recipe);
|
||||
// complex asm property Recipe
|
||||
itacConveyorInfo.Board = com.itac.oib.siplacepro.contracts.data.BoardMapper.get(asmConveyorInfo.Board);
|
||||
// complex asm property Board
|
||||
itacConveyorInfo.BoardSide = com.itac.oib.siplacepro.contracts.types.BoardSideMapper.get(asmConveyorInfo.BoardSide);
|
||||
// complex asm property BoardSide
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static ConveyorInfo[] getArray(IList<Asm.As.Oib.Client.CustomExtensions.ConveyorInfo> asmConveyorInfo)
|
||||
{
|
||||
if (asmConveyorInfo == null) { return null; }
|
||||
ConveyorInfo[] itacConveyorInfo = new ConveyorInfo[asmConveyorInfo.Count];
|
||||
for (int i = 0; i < asmConveyorInfo.Count; i++)
|
||||
{
|
||||
itacConveyorInfo[i] = ConveyorInfoMapper.get(asmConveyorInfo[i]);
|
||||
}
|
||||
return itacConveyorInfo;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static ConveyorInfo[] getArray(Asm.As.Oib.Client.CustomExtensions.ConveyorInfo[] asmConveyorInfo)
|
||||
{
|
||||
if (asmConveyorInfo == null) { return null; }
|
||||
ConveyorInfo[] itacConveyorInfo = new ConveyorInfo[asmConveyorInfo.Length];
|
||||
for (int i = 0; i < asmConveyorInfo.Length; i++)
|
||||
{
|
||||
itacConveyorInfo[i] = ConveyorInfoMapper.get(asmConveyorInfo[i]);
|
||||
}
|
||||
return itacConveyorInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user