Files
2025-06-06 09:15:13 +02:00

115 lines
4.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 31.10.2018 08:16:46
using System;
using System.Collections.Generic;
using com.itac.oib.monitoring.contracts.data;
namespace com.itac.oib.monitoring.contracts.data
{
// source: assembly 5.1.0.84
// 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 asmRecipeChange)
{
if (asmRecipeChange == null) { return null; }
Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange itacRecipeChange = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange();
mapItac2Asm(itacRecipeChange, asmRecipeChange);
return itacRecipeChange;
}
public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange itacRecipeChange, RecipeChange asmRecipeChange)
{
// complex property Recipe, isArray:False, isGeneric:False
itacRecipeChange.Recipe = com.itac.oib.monitoring.contracts.data.RecipeMapper.get( asmRecipeChange.Recipe);
itacRecipeChange.ProcessingArea = asmRecipeChange.ProcessingArea;
// complex property Conveyor, isArray:False, isGeneric:False
itacRecipeChange.Conveyor = com.itac.oib.monitoring.contracts.data.ConveyorTypeMapper.get( asmRecipeChange.Conveyor);
// complex property SubConveyor, isArray:False, isGeneric:False
itacRecipeChange.SubConveyor = com.itac.oib.monitoring.contracts.data.SubConveyorTypeMapper.get( asmRecipeChange.SubConveyor);
itacRecipeChange.StationTime = asmRecipeChange.StationTime;
}
// maps iTAC namespace conform array to ASM namespace array
public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[] get(RecipeChange[] asmRecipeChange)
{
if (asmRecipeChange == null) { return null; }
Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[] itacRecipeChange = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange[asmRecipeChange.Length];
for (int i = 0; i < asmRecipeChange.Length; i++)
{
// to itac array
itacRecipeChange[i] = RecipeChangeMapper.get(asmRecipeChange[i]);
}
return itacRecipeChange;
}
// maps iTAC namespace conform array to ASM namespace list
public static List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange> getList(RecipeChange[] asmRecipeChange)
{
if (asmRecipeChange == null) { return null; }
List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange> itacRecipeChange = new List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange>();
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<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeChange> 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;
}
}
}