107 lines
5.2 KiB
C#
107 lines
5.2 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:02:34
|
|
// skip property Int32, property in exclude list
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.siplacesetupcenter.contracts.data
|
|
{
|
|
// source: assembly 3.2.0.152
|
|
// 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 www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation get(FeederLocation itacFeederLocation)
|
|
{
|
|
if (itacFeederLocation == null) { return null; }
|
|
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation asmFeederLocation = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation();
|
|
mapItac2Asm(asmFeederLocation, itacFeederLocation);
|
|
return asmFeederLocation;
|
|
}
|
|
|
|
public static void mapItac2Asm(www.siplace.com.OIB._2008._05.SetupCenter.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
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation[] get(FeederLocation[] itacFeederLocation)
|
|
{
|
|
if (itacFeederLocation == null) { return null; }
|
|
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation[] asmFeederLocation = new www.siplace.com.OIB._2008._05.SetupCenter.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<www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation> getList(FeederLocation[] asmFeederLocation)
|
|
{
|
|
if (asmFeederLocation == null) { return null; }
|
|
List<www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation> itacFeederLocation = new List<www.siplace.com.OIB._2008._05.SetupCenter.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(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.FeederLocation asmFeederLocation)
|
|
{
|
|
if (asmFeederLocation == null) { return null; }
|
|
FeederLocation itacFeederLocation = new FeederLocation();
|
|
mapAsm2Itac(asmFeederLocation, itacFeederLocation);
|
|
return itacFeederLocation;
|
|
}
|
|
|
|
public static void mapAsm2Itac(www.siplace.com.OIB._2008._05.SetupCenter.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 namespace conform list to iTAC namespace array
|
|
public static FeederLocation[] getArray(IList<www.siplace.com.OIB._2008._05.SetupCenter.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(www.siplace.com.OIB._2008._05.SetupCenter.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;
|
|
}
|
|
}
|
|
}
|