102 lines
4.9 KiB
C#
102 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 23.11.2018 08:09:33
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.monitoring.contracts.data;
|
|
|
|
namespace com.itac.oib.monitoring.contracts.data
|
|
{
|
|
// source: assembly 3.2.0.152
|
|
// source: assembly ASM.AS.OIB.Monitoring.Proxy
|
|
public class PassmodeLocationMapper:ProcessingLocationAddressMapper
|
|
{
|
|
// 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.PassmodeLocation get(PassmodeLocation itacPassmodeLocation)
|
|
{
|
|
if (itacPassmodeLocation == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation asmPassmodeLocation = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation();
|
|
mapItac2Asm(asmPassmodeLocation, itacPassmodeLocation);
|
|
return asmPassmodeLocation;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation asmPassmodeLocation, PassmodeLocation itacPassmodeLocation)
|
|
{
|
|
// skip readonly property PassmodeStatusType
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation[] get(PassmodeLocation[] itacPassmodeLocation)
|
|
{
|
|
if (itacPassmodeLocation == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation[] asmPassmodeLocation = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation[itacPassmodeLocation.Length];
|
|
for (int i = 0; i < itacPassmodeLocation.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmPassmodeLocation[i] = PassmodeLocationMapper.get(itacPassmodeLocation[i]);
|
|
}
|
|
return asmPassmodeLocation;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation> getList(PassmodeLocation[] asmPassmodeLocation)
|
|
{
|
|
if (asmPassmodeLocation == null) { return null; }
|
|
List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation> itacPassmodeLocation = new List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation>();
|
|
for (int i = 0; i < asmPassmodeLocation.Length; i++)
|
|
{
|
|
itacPassmodeLocation.Add(PassmodeLocationMapper.get(asmPassmodeLocation[i]));
|
|
}
|
|
return itacPassmodeLocation;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static PassmodeLocation get(Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation asmPassmodeLocation)
|
|
{
|
|
if (asmPassmodeLocation == null) { return null; }
|
|
PassmodeLocation itacPassmodeLocation = new PassmodeLocation();
|
|
mapAsm2Itac(asmPassmodeLocation, itacPassmodeLocation);
|
|
return itacPassmodeLocation;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation asmPassmodeLocation, PassmodeLocation itacPassmodeLocation)
|
|
{
|
|
ProcessingLocationAddressMapper.mapAsm2Itac(asmPassmodeLocation, itacPassmodeLocation);
|
|
itacPassmodeLocation.PassmodeStatusType = com.itac.oib.monitoring.contracts.data.PassmodeStatusTypeMapper.get(asmPassmodeLocation.PassmodeStatusType);
|
|
// complex asm property PassmodeStatusType
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static PassmodeLocation[] getArray(IList<Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation> asmPassmodeLocation)
|
|
{
|
|
if (asmPassmodeLocation == null) { return null; }
|
|
PassmodeLocation[] itacPassmodeLocation = new PassmodeLocation[asmPassmodeLocation.Count];
|
|
for (int i = 0; i < asmPassmodeLocation.Count; i++)
|
|
{
|
|
itacPassmodeLocation[i] = PassmodeLocationMapper.get(asmPassmodeLocation[i]);
|
|
}
|
|
return itacPassmodeLocation;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static PassmodeLocation[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.Objects.PassmodeLocation[] asmPassmodeLocation)
|
|
{
|
|
if (asmPassmodeLocation == null) { return null; }
|
|
PassmodeLocation[] itacPassmodeLocation = new PassmodeLocation[asmPassmodeLocation.Length];
|
|
for (int i = 0; i < asmPassmodeLocation.Length; i++)
|
|
{
|
|
itacPassmodeLocation[i] = PassmodeLocationMapper.get(asmPassmodeLocation[i]);
|
|
}
|
|
return itacPassmodeLocation;
|
|
}
|
|
}
|
|
}
|