/* * 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:09:33 using System; using System.Collections.Generic; using com.itac.oib.monitoring.contracts.data; namespace com.itac.oib.monitoring.contracts.data { // source: assembly 3.2.0.152 // source: assembly ASM.AS.OIB.Monitoring.Proxy public class RecipeChangeMapper:RecipeBaseMapper { // used for itac->asm: True // used for asm->itac: True // maps iTAC namespace conform type to ASM namespace type public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange get(RecipeChange itacRecipeChange) { if (itacRecipeChange == null) { return null; } Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange asmRecipeChange = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange(); mapItac2Asm(asmRecipeChange, itacRecipeChange); return asmRecipeChange; } public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange asmRecipeChange, RecipeChange itacRecipeChange) { // complex property Recipe, isArray:False, isGeneric:False asmRecipeChange.Recipe = com.itac.oib.monitoring.contracts.data.RecipeMapper.get( itacRecipeChange.Recipe); asmRecipeChange.ProcessingArea = itacRecipeChange.ProcessingArea; // complex property Conveyor, isArray:False, isGeneric:False asmRecipeChange.Conveyor = com.itac.oib.monitoring.contracts.data.ConveyorTypeMapper.get( itacRecipeChange.Conveyor); // complex property SubConveyor, isArray:False, isGeneric:False asmRecipeChange.SubConveyor = com.itac.oib.monitoring.contracts.data.SubConveyorTypeMapper.get( itacRecipeChange.SubConveyor); asmRecipeChange.StationTime = itacRecipeChange.StationTime; } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[] get(RecipeChange[] itacRecipeChange) { if (itacRecipeChange == null) { return null; } Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[] asmRecipeChange = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[itacRecipeChange.Length]; for (int i = 0; i < itacRecipeChange.Length; i++) { // to itac array asmRecipeChange[i] = RecipeChangeMapper.get(itacRecipeChange[i]); } return asmRecipeChange; } // maps iTAC namespace conform array to ASM namespace list public static List getList(RecipeChange[] asmRecipeChange) { if (asmRecipeChange == null) { return null; } List itacRecipeChange = new List(); for (int i = 0; i < asmRecipeChange.Length; i++) { itacRecipeChange.Add(RecipeChangeMapper.get(asmRecipeChange[i])); } return itacRecipeChange; } // map type from ASM namespace to iTAC namespace public static RecipeChange get(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange asmRecipeChange) { if (asmRecipeChange == null) { return null; } RecipeChange itacRecipeChange = new RecipeChange(); mapAsm2Itac(asmRecipeChange, itacRecipeChange); return itacRecipeChange; } public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange asmRecipeChange, RecipeChange itacRecipeChange) { RecipeBaseMapper.mapAsm2Itac(asmRecipeChange, itacRecipeChange); itacRecipeChange.Recipe = com.itac.oib.monitoring.contracts.data.RecipeMapper.get(asmRecipeChange.Recipe); // complex asm property Recipe itacRecipeChange.ProcessingArea = asmRecipeChange.ProcessingArea; itacRecipeChange.Conveyor = com.itac.oib.monitoring.contracts.data.ConveyorTypeMapper.get(asmRecipeChange.Conveyor); // complex asm property Conveyor itacRecipeChange.SubConveyor = com.itac.oib.monitoring.contracts.data.SubConveyorTypeMapper.get(asmRecipeChange.SubConveyor); // complex asm property SubConveyor itacRecipeChange.StationTime = asmRecipeChange.StationTime; } // maps ASM namespace conform list to iTAC namespace array public static RecipeChange[] getArray(IList asmRecipeChange) { if (asmRecipeChange == null) { return null; } RecipeChange[] itacRecipeChange = new RecipeChange[asmRecipeChange.Count]; for (int i = 0; i < asmRecipeChange.Count; i++) { itacRecipeChange[i] = RecipeChangeMapper.get(asmRecipeChange[i]); } return itacRecipeChange; } // maps ASM namespace conform array to iTAC namespace array public static RecipeChange[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[] asmRecipeChange) { if (asmRecipeChange == null) { return null; } RecipeChange[] itacRecipeChange = new RecipeChange[asmRecipeChange.Length]; for (int i = 0; i < asmRecipeChange.Length; i++) { itacRecipeChange[i] = RecipeChangeMapper.get(asmRecipeChange[i]); } return itacRecipeChange; } } }