119 lines
5.9 KiB
C#
119 lines
5.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 06.11.2018 11:58:58
|
|
// skip property Int32, property in exclude list
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.siplacesetupcenter.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.SIPLACESetupCenter.Contracts
|
|
public class FeederLocationMapper:TableLocationMapper
|
|
{
|
|
// used for itac->asm: True
|
|
// used for asm->itac: True
|
|
|
|
// maps iTAC namespace conform type to ASM namespace type
|
|
public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation get(FeederLocation itacFeederLocation)
|
|
{
|
|
if (itacFeederLocation == null) { return null; }
|
|
Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation asmFeederLocation = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation();
|
|
mapItac2Asm(asmFeederLocation, itacFeederLocation);
|
|
return asmFeederLocation;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation asmFeederLocation, FeederLocation itacFeederLocation)
|
|
{
|
|
asmFeederLocation.Track = itacFeederLocation.Track;
|
|
asmFeederLocation.FeederId = itacFeederLocation.FeederId;
|
|
asmFeederLocation.FeederType = itacFeederLocation.FeederType;
|
|
// skip property Int32, property in exclude list
|
|
// complex property Divisions, isArray:False, isGeneric:True
|
|
asmFeederLocation.Divisions = DivisionMapper.getList(itacFeederLocation.Divisions);
|
|
asmFeederLocation.TargetTrack = itacFeederLocation.TargetTrack;
|
|
asmFeederLocation.CartridgeId = itacFeederLocation.CartridgeId;
|
|
asmFeederLocation.CassetteId = itacFeederLocation.CassetteId;
|
|
asmFeederLocation.CassetteLevel = itacFeederLocation.CassetteLevel;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation[] get(FeederLocation[] itacFeederLocation)
|
|
{
|
|
if (itacFeederLocation == null) { return null; }
|
|
Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation[] asmFeederLocation = new Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation[itacFeederLocation.Length];
|
|
for (int i = 0; i < itacFeederLocation.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmFeederLocation[i] = FeederLocationMapper.get(itacFeederLocation[i]);
|
|
}
|
|
return asmFeederLocation;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation> getList(FeederLocation[] asmFeederLocation)
|
|
{
|
|
if (asmFeederLocation == null) { return null; }
|
|
List<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation> itacFeederLocation = new List<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation>();
|
|
for (int i = 0; i < asmFeederLocation.Length; i++)
|
|
{
|
|
itacFeederLocation.Add(FeederLocationMapper.get(asmFeederLocation[i]));
|
|
}
|
|
return itacFeederLocation;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static FeederLocation get(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation asmFeederLocation)
|
|
{
|
|
if (asmFeederLocation == null) { return null; }
|
|
FeederLocation itacFeederLocation = new FeederLocation();
|
|
mapAsm2Itac(asmFeederLocation, itacFeederLocation);
|
|
return itacFeederLocation;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation asmFeederLocation, FeederLocation itacFeederLocation)
|
|
{
|
|
TableLocationMapper.mapAsm2Itac(asmFeederLocation, itacFeederLocation);
|
|
itacFeederLocation.Track = asmFeederLocation.Track;
|
|
itacFeederLocation.FeederId = asmFeederLocation.FeederId;
|
|
itacFeederLocation.FeederType = asmFeederLocation.FeederType;
|
|
// skip property Int32, property in exclude list
|
|
// maps ASM list 2 iTAC array
|
|
itacFeederLocation.Divisions = DivisionMapper.getArray(asmFeederLocation.Divisions);
|
|
itacFeederLocation.TargetTrack = asmFeederLocation.TargetTrack;
|
|
itacFeederLocation.CartridgeId = asmFeederLocation.CartridgeId;
|
|
itacFeederLocation.CassetteId = asmFeederLocation.CassetteId;
|
|
itacFeederLocation.CassetteLevel = asmFeederLocation.CassetteLevel;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static FeederLocation[] getArray(IList<Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation> asmFeederLocation)
|
|
{
|
|
if (asmFeederLocation == null) { return null; }
|
|
FeederLocation[] itacFeederLocation = new FeederLocation[asmFeederLocation.Count];
|
|
for (int i = 0; i < asmFeederLocation.Count; i++)
|
|
{
|
|
itacFeederLocation[i] = FeederLocationMapper.get(asmFeederLocation[i]);
|
|
}
|
|
return itacFeederLocation;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static FeederLocation[] getArray(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.FeederLocation[] asmFeederLocation)
|
|
{
|
|
if (asmFeederLocation == null) { return null; }
|
|
FeederLocation[] itacFeederLocation = new FeederLocation[asmFeederLocation.Length];
|
|
for (int i = 0; i < asmFeederLocation.Length; i++)
|
|
{
|
|
itacFeederLocation[i] = FeederLocationMapper.get(asmFeederLocation[i]);
|
|
}
|
|
return itacFeederLocation;
|
|
}
|
|
}
|
|
}
|