104 lines
5.0 KiB
C#
104 lines
5.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 05.11.2018 15:39:46
|
|
// skip property ExtensionDataObject, declared in BoardCheckInResponse
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace com.itac.oib.traceability.contracts.data
|
|
{
|
|
// source: assembly 3.0.0.0
|
|
// source: assembly ASM.AS.OIB.Client
|
|
public class BoardCheckInResponseMapper
|
|
{
|
|
// 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._2012._03.Traceability.Contracts.Data.BoardCheckInResponse get(BoardCheckInResponse itacBoardCheckInResponse)
|
|
{
|
|
if (itacBoardCheckInResponse == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse asmBoardCheckInResponse = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse();
|
|
mapItac2Asm(asmBoardCheckInResponse, itacBoardCheckInResponse);
|
|
return asmBoardCheckInResponse;
|
|
}
|
|
|
|
public static void mapItac2Asm(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse asmBoardCheckInResponse, BoardCheckInResponse itacBoardCheckInResponse)
|
|
{
|
|
// skip property ExtensionDataObject, declared in BoardCheckInResponse
|
|
asmBoardCheckInResponse.BoardValidationReason = itacBoardCheckInResponse.BoardValidationReason;
|
|
asmBoardCheckInResponse.BoardValidationResult = itacBoardCheckInResponse.BoardValidationResult;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse[] get(BoardCheckInResponse[] itacBoardCheckInResponse)
|
|
{
|
|
if (itacBoardCheckInResponse == null) { return null; }
|
|
www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse[] asmBoardCheckInResponse = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse[itacBoardCheckInResponse.Length];
|
|
for (int i = 0; i < itacBoardCheckInResponse.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmBoardCheckInResponse[i] = BoardCheckInResponseMapper.get(itacBoardCheckInResponse[i]);
|
|
}
|
|
return asmBoardCheckInResponse;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse> getList(BoardCheckInResponse[] asmBoardCheckInResponse)
|
|
{
|
|
if (asmBoardCheckInResponse == null) { return null; }
|
|
List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse> itacBoardCheckInResponse = new List<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse>();
|
|
for (int i = 0; i < asmBoardCheckInResponse.Length; i++)
|
|
{
|
|
itacBoardCheckInResponse.Add(BoardCheckInResponseMapper.get(asmBoardCheckInResponse[i]));
|
|
}
|
|
return itacBoardCheckInResponse;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static BoardCheckInResponse get(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse asmBoardCheckInResponse)
|
|
{
|
|
if (asmBoardCheckInResponse == null) { return null; }
|
|
BoardCheckInResponse itacBoardCheckInResponse = new BoardCheckInResponse();
|
|
mapAsm2Itac(asmBoardCheckInResponse, itacBoardCheckInResponse);
|
|
return itacBoardCheckInResponse;
|
|
}
|
|
|
|
public static void mapAsm2Itac(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse asmBoardCheckInResponse, BoardCheckInResponse itacBoardCheckInResponse)
|
|
{
|
|
// skip property ExtensionDataObject, declared in BoardCheckInResponse
|
|
itacBoardCheckInResponse.BoardValidationReason = asmBoardCheckInResponse.BoardValidationReason;
|
|
itacBoardCheckInResponse.BoardValidationResult = asmBoardCheckInResponse.BoardValidationResult;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static BoardCheckInResponse[] getArray(IList<www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse> asmBoardCheckInResponse)
|
|
{
|
|
if (asmBoardCheckInResponse == null) { return null; }
|
|
BoardCheckInResponse[] itacBoardCheckInResponse = new BoardCheckInResponse[asmBoardCheckInResponse.Count];
|
|
for (int i = 0; i < asmBoardCheckInResponse.Count; i++)
|
|
{
|
|
itacBoardCheckInResponse[i] = BoardCheckInResponseMapper.get(asmBoardCheckInResponse[i]);
|
|
}
|
|
return itacBoardCheckInResponse;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static BoardCheckInResponse[] getArray(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInResponse[] asmBoardCheckInResponse)
|
|
{
|
|
if (asmBoardCheckInResponse == null) { return null; }
|
|
BoardCheckInResponse[] itacBoardCheckInResponse = new BoardCheckInResponse[asmBoardCheckInResponse.Length];
|
|
for (int i = 0; i < asmBoardCheckInResponse.Length; i++)
|
|
{
|
|
itacBoardCheckInResponse[i] = BoardCheckInResponseMapper.get(asmBoardCheckInResponse[i]);
|
|
}
|
|
return itacBoardCheckInResponse;
|
|
}
|
|
}
|
|
}
|