95 lines
4.0 KiB
C#
95 lines
4.0 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
|
|
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 LockInfoMapper
|
|
{
|
|
// 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.LockInfo get(LockInfo itacLockInfo)
|
|
{
|
|
if (itacLockInfo == null) { return null; }
|
|
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo asmLockInfo = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo();
|
|
mapItac2Asm(asmLockInfo, itacLockInfo);
|
|
return asmLockInfo;
|
|
}
|
|
|
|
public static void mapItac2Asm(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo asmLockInfo, LockInfo itacLockInfo)
|
|
{
|
|
asmLockInfo.Source = itacLockInfo.Source;
|
|
asmLockInfo.Reason = itacLockInfo.Reason;
|
|
asmLockInfo.Date = itacLockInfo.Date;
|
|
asmLockInfo.Message = itacLockInfo.Message;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[] get(LockInfo[] itacLockInfo)
|
|
{
|
|
if (itacLockInfo == null) { return null; }
|
|
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[] asmLockInfo = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[itacLockInfo.Length];
|
|
for (int i = 0; i < itacLockInfo.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmLockInfo[i] = LockInfoMapper.get(itacLockInfo[i]);
|
|
}
|
|
return asmLockInfo;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[] getList(LockInfo[] asmLockInfo)
|
|
{
|
|
if (asmLockInfo == null) { return null; }
|
|
www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[] itacLockInfo = new www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[asmLockInfo.Length];
|
|
for (int i = 0; i < asmLockInfo.Length; i++)
|
|
{
|
|
itacLockInfo[i] = LockInfoMapper.get(asmLockInfo[i]);
|
|
}
|
|
return itacLockInfo;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static LockInfo get(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo asmLockInfo)
|
|
{
|
|
if (asmLockInfo == null) { return null; }
|
|
LockInfo itacLockInfo = new LockInfo();
|
|
mapAsm2Itac(asmLockInfo, itacLockInfo);
|
|
return itacLockInfo;
|
|
}
|
|
|
|
public static void mapAsm2Itac(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo asmLockInfo, LockInfo itacLockInfo)
|
|
{
|
|
itacLockInfo.Source = asmLockInfo.Source;
|
|
itacLockInfo.Reason = asmLockInfo.Reason;
|
|
itacLockInfo.Date = asmLockInfo.Date;
|
|
itacLockInfo.Message = asmLockInfo.Message;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static LockInfo[] getArray(www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.LockInfo[] asmLockInfo)
|
|
{
|
|
if (asmLockInfo == null) { return null; }
|
|
LockInfo[] itacLockInfo = new LockInfo[asmLockInfo.Length];
|
|
for (int i = 0; i < asmLockInfo.Length; i++)
|
|
{
|
|
itacLockInfo[i] = LockInfoMapper.get(asmLockInfo[i]);
|
|
}
|
|
return itacLockInfo;
|
|
}
|
|
|
|
|
|
}
|
|
}
|