100 lines
4.2 KiB
C#
100 lines
4.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:09:33
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.monitoring.contracts.data
|
|
{
|
|
// source: assembly 3.2.0.152
|
|
// source: assembly ASM.AS.OIB.Monitoring.Proxy
|
|
public class LineBaseMapper:MonitoringDataMapper
|
|
{
|
|
// 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.BaseClasses.LineBase get(LineBase itacLineBase)
|
|
{
|
|
if (itacLineBase == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase asmLineBase = new Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase(Asm.As.Oib.SiplacePro.Proxy.Business.Types.ResourceIDs.AttachableheadtypeCp_20);
|
|
mapItac2Asm(asmLineBase, itacLineBase);
|
|
return asmLineBase;
|
|
}*/
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase asmLineBase, LineBase itacLineBase)
|
|
{
|
|
asmLineBase.FullPath = itacLineBase.FullPath;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase[] get(LineBase[] itacLineBase)
|
|
{
|
|
if (itacLineBase == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase[] asmLineBase = new Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase[itacLineBase.Length];
|
|
for (int i = 0; i < itacLineBase.Length; i++)
|
|
{
|
|
// to itac array
|
|
// asmLineBase[i] = LineBaseMapper.get(itacLineBase[i]);
|
|
}
|
|
return asmLineBase;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase> getList(LineBase[] asmLineBase)
|
|
{
|
|
if (asmLineBase == null) { return null; }
|
|
List<Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase> itacLineBase = new List<Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase>();
|
|
for (int i = 0; i < asmLineBase.Length; i++)
|
|
{
|
|
// itacLineBase.Add(LineBaseMapper.get(asmLineBase[i]));
|
|
}
|
|
return itacLineBase;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static LineBase get(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase asmLineBase)
|
|
{
|
|
if (asmLineBase == null) { return null; }
|
|
LineBase itacLineBase = new LineBase();
|
|
mapAsm2Itac(asmLineBase, itacLineBase);
|
|
return itacLineBase;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase asmLineBase, LineBase itacLineBase)
|
|
{
|
|
MonitoringDataMapper.mapAsm2Itac(asmLineBase, itacLineBase);
|
|
itacLineBase.FullPath = asmLineBase.FullPath;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static LineBase[] getArray(IList<Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase> asmLineBase)
|
|
{
|
|
if (asmLineBase == null) { return null; }
|
|
LineBase[] itacLineBase = new LineBase[asmLineBase.Count];
|
|
for (int i = 0; i < asmLineBase.Count; i++)
|
|
{
|
|
itacLineBase[i] = LineBaseMapper.get(asmLineBase[i]);
|
|
}
|
|
return itacLineBase;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static LineBase[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.BaseClasses.LineBase[] asmLineBase)
|
|
{
|
|
if (asmLineBase == null) { return null; }
|
|
LineBase[] itacLineBase = new LineBase[asmLineBase.Length];
|
|
for (int i = 0; i < asmLineBase.Length; i++)
|
|
{
|
|
itacLineBase[i] = LineBaseMapper.get(asmLineBase[i]);
|
|
}
|
|
return itacLineBase;
|
|
}
|
|
}
|
|
}
|