67 lines
2.8 KiB
C#
67 lines
2.8 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 31.10.2018 08:16:46
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.monitoring.contracts.data;
|
|
|
|
namespace com.itac.oib.monitoring.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.Monitoring.Proxy
|
|
public class StationBaseMapper:MonitoringDataMapper
|
|
{
|
|
// used for itac->asm: True
|
|
// used for asm->itac: True
|
|
|
|
// maps iTAC namespace conform type to ASM namespace type
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static StationBase get(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.StationBase asmStationBase)
|
|
{
|
|
if (asmStationBase == null) { return null; }
|
|
StationBase itacStationBase = new StationBase();
|
|
mapAsm2Itac(asmStationBase, itacStationBase);
|
|
return itacStationBase;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.StationBase asmStationBase, StationBase itacStationBase)
|
|
{
|
|
MonitoringDataMapper.mapAsm2Itac(asmStationBase, itacStationBase);
|
|
itacStationBase.Station = com.itac.oib.monitoring.contracts.data.StationMapper.get(asmStationBase.Station);
|
|
// complex asm property Station
|
|
itacStationBase.CompletionStatusType = com.itac.oib.monitoring.contracts.data.CompletionStatusTypeMapper.get(asmStationBase.CompletionStatusType);
|
|
// complex asm property CompletionStatusType
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static StationBase[] getArray(IList<Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.StationBase> asmStationBase)
|
|
{
|
|
if (asmStationBase == null) { return null; }
|
|
StationBase[] itacStationBase = new StationBase[asmStationBase.Count];
|
|
for (int i = 0; i < asmStationBase.Count; i++)
|
|
{
|
|
itacStationBase[i] = StationBaseMapper.get(asmStationBase[i]);
|
|
}
|
|
return itacStationBase;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static StationBase[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.StationBase[] asmStationBase)
|
|
{
|
|
if (asmStationBase == null) { return null; }
|
|
StationBase[] itacStationBase = new StationBase[asmStationBase.Length];
|
|
for (int i = 0; i < asmStationBase.Length; i++)
|
|
{
|
|
itacStationBase[i] = StationBaseMapper.get(asmStationBase[i]);
|
|
}
|
|
return itacStationBase;
|
|
}
|
|
}
|
|
}
|