162 lines
8.1 KiB
C#
162 lines
8.1 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 AdditionalOperationInformation, declared in Recipe
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property NamedObjectBase, declared in Recipe
|
|
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 RecipeMapper
|
|
{
|
|
// 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.Recipe get(Recipe itacRecipe)
|
|
{
|
|
if (itacRecipe == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe asmRecipe = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe();
|
|
mapItac2Asm(asmRecipe, itacRecipe);
|
|
return asmRecipe;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe asmRecipe, Recipe itacRecipe)
|
|
{
|
|
// skip readonly property LineName
|
|
// skip readonly property SetupName
|
|
asmRecipe.LotSize = itacRecipe.LotSize;
|
|
// complex property ConveyorLane, isArray:False, isGeneric:False
|
|
asmRecipe.ConveyorLane = com.itac.oib.siplacepro.contracts.types.ConveyorLaneTypeMapper.get( itacRecipe.ConveyorLane);
|
|
// complex property Setup, isArray:False, isGeneric:False
|
|
asmRecipe.Setup = com.itac.oib.siplacepro.contracts.data.SetupMapper.get( itacRecipe.Setup);
|
|
asmRecipe.RecipeCycleTime = itacRecipe.RecipeCycleTime;
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
asmRecipe.GenerateTraceInformation = itacRecipe.GenerateTraceInformation;
|
|
// skip readonly property BoardElements
|
|
// skip readonly property Board2Elements
|
|
asmRecipe.AverageUtilization = itacRecipe.AverageUtilization;
|
|
// skip property AdditionalOperationInformation, declared in Recipe
|
|
asmRecipe.EnableProxyMode = itacRecipe.EnableProxyMode;
|
|
// complex property SplitTableModeSetting, isArray:False, isGeneric:False
|
|
asmRecipe.SplitTableModeSetting = com.itac.oib.siplacepro.contracts.types.SplitTableModeMapper.get( itacRecipe.SplitTableModeSetting);
|
|
// skip readonly property LotSizeCountUnit
|
|
// skip property ListProxy`1, property in exclude list
|
|
asmRecipe.QuantityUnlimited = itacRecipe.QuantityUnlimited;
|
|
// skip readonly property ConveyorLane2
|
|
asmRecipe.LotSizeBoards = itacRecipe.LotSizeBoards;
|
|
asmRecipe.LotSizeAssembledPCBs = itacRecipe.LotSizeAssembledPCBs;
|
|
// skip readonly property IsMatchingPanelCount
|
|
// skip readonly property IsAnyPanelCountZero
|
|
// skip property NamedObjectBase, declared in Recipe
|
|
// 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.Recipe[] get(Recipe[] itacRecipe)
|
|
{
|
|
if (itacRecipe == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe[] asmRecipe = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe[itacRecipe.Length];
|
|
for (int i = 0; i < itacRecipe.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmRecipe[i] = RecipeMapper.get(itacRecipe[i]);
|
|
}
|
|
return asmRecipe;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe> getList(Recipe[] asmRecipe)
|
|
{
|
|
if (asmRecipe == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe> itacRecipe = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe>();
|
|
for (int i = 0; i < asmRecipe.Length; i++)
|
|
{
|
|
itacRecipe.Add(RecipeMapper.get(asmRecipe[i]));
|
|
}
|
|
return itacRecipe;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static Recipe get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe asmRecipe)
|
|
{
|
|
if (asmRecipe == null) { return null; }
|
|
Recipe itacRecipe = new Recipe();
|
|
mapAsm2Itac(asmRecipe, itacRecipe);
|
|
return itacRecipe;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe asmRecipe, Recipe itacRecipe)
|
|
{
|
|
itacRecipe.LineName = asmRecipe.LineName;
|
|
itacRecipe.SetupName = asmRecipe.SetupName;
|
|
itacRecipe.LotSize = asmRecipe.LotSize;
|
|
itacRecipe.ConveyorLane = com.itac.oib.siplacepro.contracts.types.ConveyorLaneTypeMapper.get(asmRecipe.ConveyorLane);
|
|
// complex asm property ConveyorLane
|
|
itacRecipe.Setup = com.itac.oib.siplacepro.contracts.data.SetupMapper.get(asmRecipe.Setup);
|
|
// complex asm property Setup
|
|
itacRecipe.RecipeCycleTime = asmRecipe.RecipeCycleTime;
|
|
// skip property DictionaryProxy`2, property in exclude list
|
|
itacRecipe.GenerateTraceInformation = asmRecipe.GenerateTraceInformation;
|
|
// maps ASM list 2 iTAC array
|
|
itacRecipe.BoardElements = BoardElementMapper.getArray(asmRecipe.BoardElements);
|
|
// maps ASM list 2 iTAC array
|
|
itacRecipe.Board2Elements = BoardElementMapper.getArray(asmRecipe.Board2Elements);
|
|
itacRecipe.AverageUtilization = asmRecipe.AverageUtilization;
|
|
// skip property AdditionalOperationInformation, declared in Recipe
|
|
itacRecipe.EnableProxyMode = asmRecipe.EnableProxyMode;
|
|
itacRecipe.SplitTableModeSetting = com.itac.oib.siplacepro.contracts.types.SplitTableModeMapper.get(asmRecipe.SplitTableModeSetting);
|
|
// complex asm property SplitTableModeSetting
|
|
itacRecipe.LotSizeCountUnit = com.itac.oib.siplacepro.contracts.types.LotSizeCountUnitMapper.get(asmRecipe.LotSizeCountUnit);
|
|
// complex asm property LotSizeCountUnit
|
|
// skip property ListProxy`1, property in exclude list
|
|
itacRecipe.QuantityUnlimited = asmRecipe.QuantityUnlimited;
|
|
itacRecipe.ConveyorLane2 = com.itac.oib.siplacepro.contracts.types.ConveyorLaneTypeMapper.get(asmRecipe.ConveyorLane2);
|
|
// complex asm property ConveyorLane2
|
|
itacRecipe.LotSizeBoards = asmRecipe.LotSizeBoards;
|
|
itacRecipe.LotSizeAssembledPCBs = asmRecipe.LotSizeAssembledPCBs;
|
|
itacRecipe.IsMatchingPanelCount = asmRecipe.IsMatchingPanelCount;
|
|
itacRecipe.IsAnyPanelCountZero = asmRecipe.IsAnyPanelCountZero;
|
|
// skip property NamedObjectBase, declared in Recipe
|
|
itacRecipe.Name = asmRecipe.Name;
|
|
itacRecipe.FullPath = asmRecipe.FullPath;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static Recipe[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe> asmRecipe)
|
|
{
|
|
if (asmRecipe == null) { return null; }
|
|
Recipe[] itacRecipe = new Recipe[asmRecipe.Count];
|
|
for (int i = 0; i < asmRecipe.Count; i++)
|
|
{
|
|
itacRecipe[i] = RecipeMapper.get(asmRecipe[i]);
|
|
}
|
|
return itacRecipe;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static Recipe[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Recipe[] asmRecipe)
|
|
{
|
|
if (asmRecipe == null) { return null; }
|
|
Recipe[] itacRecipe = new Recipe[asmRecipe.Length];
|
|
for (int i = 0; i < asmRecipe.Length; i++)
|
|
{
|
|
itacRecipe[i] = RecipeMapper.get(asmRecipe[i]);
|
|
}
|
|
return itacRecipe;
|
|
}
|
|
}
|
|
}
|