101 lines
4.8 KiB
C#
101 lines
4.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 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 RecipeCollectionMapper: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.Objects.RecipeCollection get(RecipeCollection itacRecipeCollection)
|
|
{
|
|
if (itacRecipeCollection == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection asmRecipeCollection = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection();
|
|
mapItac2Asm(asmRecipeCollection, itacRecipeCollection);
|
|
return asmRecipeCollection;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection asmRecipeCollection, RecipeCollection itacRecipeCollection)
|
|
{
|
|
// skip readonly property RecipeLocations
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection[] get(RecipeCollection[] itacRecipeCollection)
|
|
{
|
|
if (itacRecipeCollection == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection[] asmRecipeCollection = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection[itacRecipeCollection.Length];
|
|
for (int i = 0; i < itacRecipeCollection.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmRecipeCollection[i] = RecipeCollectionMapper.get(itacRecipeCollection[i]);
|
|
}
|
|
return asmRecipeCollection;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection> getList(RecipeCollection[] asmRecipeCollection)
|
|
{
|
|
if (asmRecipeCollection == null) { return null; }
|
|
List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection> itacRecipeCollection = new List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection>();
|
|
for (int i = 0; i < asmRecipeCollection.Length; i++)
|
|
{
|
|
itacRecipeCollection.Add(RecipeCollectionMapper.get(asmRecipeCollection[i]));
|
|
}
|
|
return itacRecipeCollection;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static RecipeCollection get(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection asmRecipeCollection)
|
|
{
|
|
if (asmRecipeCollection == null) { return null; }
|
|
RecipeCollection itacRecipeCollection = new RecipeCollection();
|
|
mapAsm2Itac(asmRecipeCollection, itacRecipeCollection);
|
|
return itacRecipeCollection;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection asmRecipeCollection, RecipeCollection itacRecipeCollection)
|
|
{
|
|
MonitoringDataMapper.mapAsm2Itac(asmRecipeCollection, itacRecipeCollection);
|
|
// maps ASM list 2 iTAC array
|
|
itacRecipeCollection.RecipeLocations = RecipeLocationMapper.getArray(asmRecipeCollection.RecipeLocations);
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static RecipeCollection[] getArray(IList<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection> asmRecipeCollection)
|
|
{
|
|
if (asmRecipeCollection == null) { return null; }
|
|
RecipeCollection[] itacRecipeCollection = new RecipeCollection[asmRecipeCollection.Count];
|
|
for (int i = 0; i < asmRecipeCollection.Count; i++)
|
|
{
|
|
itacRecipeCollection[i] = RecipeCollectionMapper.get(asmRecipeCollection[i]);
|
|
}
|
|
return itacRecipeCollection;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static RecipeCollection[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeCollection[] asmRecipeCollection)
|
|
{
|
|
if (asmRecipeCollection == null) { return null; }
|
|
RecipeCollection[] itacRecipeCollection = new RecipeCollection[asmRecipeCollection.Length];
|
|
for (int i = 0; i < asmRecipeCollection.Length; i++)
|
|
{
|
|
itacRecipeCollection[i] = RecipeCollectionMapper.get(asmRecipeCollection[i]);
|
|
}
|
|
return itacRecipeCollection;
|
|
}
|
|
}
|
|
}
|