115 lines
5.1 KiB
C#
115 lines
5.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 26.11.2018 14:30:03
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.siplacepro.contracts.data
|
|
{
|
|
// source: assembly 5.3.0.60
|
|
// source: assembly ASM.AS.OIB.SIPLACEPro.Proxy
|
|
public class LocationMapper
|
|
{
|
|
// used for itac->asm: True
|
|
// used for asm->itac: True
|
|
|
|
// maps iTAC namespace conform type to ASM namespace type
|
|
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location asmLocation, Location itacLocation)
|
|
{
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip readonly property MCLocationID
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip readonly property SubID
|
|
// skip readonly property LocationType
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip readonly property SupportsTableDeconfiguration
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location[] get(Location[] itacLocation)
|
|
{
|
|
if (itacLocation == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location[] asmLocation = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location[itacLocation.Length];
|
|
for (int i = 0; i < itacLocation.Length; i++)
|
|
{
|
|
// to itac array
|
|
// asmLocation[i] = LocationMapper.get(itacLocation[i]);
|
|
}
|
|
return asmLocation;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location> getList(Location[] asmLocation)
|
|
{
|
|
if (asmLocation == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location> itacLocation = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location>();
|
|
for (int i = 0; i < asmLocation.Length; i++)
|
|
{
|
|
// itacLocation.Add(LocationMapper.get(asmLocation[i]));
|
|
}
|
|
return itacLocation;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static Location get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location asmLocation)
|
|
{
|
|
if (asmLocation == null) { return null; }
|
|
Location itacLocation = new Location();
|
|
mapAsm2Itac(asmLocation, itacLocation);
|
|
return itacLocation;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location asmLocation, Location itacLocation)
|
|
{
|
|
// skip property ListProxy`1, property in exclude list
|
|
itacLocation.MCLocationID = asmLocation.MCLocationID;
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
itacLocation.SubID = asmLocation.SubID;
|
|
itacLocation.LocationType = com.itac.oib.siplacepro.contracts.types.LocationMapper.get(asmLocation.LocationType);
|
|
// complex asm property LocationType
|
|
// skip property ListProxy`1, property in exclude list
|
|
itacLocation.SupportsTableDeconfiguration = asmLocation.SupportsTableDeconfiguration;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static Location[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location> asmLocation)
|
|
{
|
|
if (asmLocation == null) { return null; }
|
|
Location[] itacLocation = new Location[asmLocation.Count];
|
|
for (int i = 0; i < asmLocation.Count; i++)
|
|
{
|
|
itacLocation[i] = LocationMapper.get(asmLocation[i]);
|
|
}
|
|
return itacLocation;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static Location[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Location[] asmLocation)
|
|
{
|
|
if (asmLocation == null) { return null; }
|
|
Location[] itacLocation = new Location[asmLocation.Length];
|
|
for (int i = 0; i < asmLocation.Length; i++)
|
|
{
|
|
itacLocation[i] = LocationMapper.get(asmLocation[i]);
|
|
}
|
|
return itacLocation;
|
|
}
|
|
}
|
|
}
|