/* * 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 BoardCheckInRequest 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 BoardCheckInRequestMapper { // 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.BoardCheckInRequest get(BoardCheckInRequest itacBoardCheckInRequest) { if (itacBoardCheckInRequest == null) { return null; } www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest asmBoardCheckInRequest = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest(); mapItac2Asm(asmBoardCheckInRequest, itacBoardCheckInRequest); return asmBoardCheckInRequest; } public static void mapItac2Asm(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest asmBoardCheckInRequest, BoardCheckInRequest itacBoardCheckInRequest) { // skip property ExtensionDataObject, declared in BoardCheckInRequest asmBoardCheckInRequest.BoardId = itacBoardCheckInRequest.BoardId; asmBoardCheckInRequest.CheckInErrorCode = itacBoardCheckInRequest.CheckInErrorCode; asmBoardCheckInRequest.LineName = itacBoardCheckInRequest.LineName; asmBoardCheckInRequest.MostCriticalMSDExpireDate = itacBoardCheckInRequest.MostCriticalMSDExpireDate; asmBoardCheckInRequest.RecipeName = itacBoardCheckInRequest.RecipeName; asmBoardCheckInRequest.ScanTime = itacBoardCheckInRequest.ScanTime; } // maps iTAC namespace conform array to ASM namespace array public static www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest[] get(BoardCheckInRequest[] itacBoardCheckInRequest) { if (itacBoardCheckInRequest == null) { return null; } www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest[] asmBoardCheckInRequest = new www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest[itacBoardCheckInRequest.Length]; for (int i = 0; i < itacBoardCheckInRequest.Length; i++) { // to itac array asmBoardCheckInRequest[i] = BoardCheckInRequestMapper.get(itacBoardCheckInRequest[i]); } return asmBoardCheckInRequest; } // maps iTAC namespace conform array to ASM namespace list public static List getList(BoardCheckInRequest[] asmBoardCheckInRequest) { if (asmBoardCheckInRequest == null) { return null; } List itacBoardCheckInRequest = new List(); for (int i = 0; i < asmBoardCheckInRequest.Length; i++) { itacBoardCheckInRequest.Add(BoardCheckInRequestMapper.get(asmBoardCheckInRequest[i])); } return itacBoardCheckInRequest; } // map type from ASM namespace to iTAC namespace public static BoardCheckInRequest get(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest asmBoardCheckInRequest) { if (asmBoardCheckInRequest == null) { return null; } BoardCheckInRequest itacBoardCheckInRequest = new BoardCheckInRequest(); mapAsm2Itac(asmBoardCheckInRequest, itacBoardCheckInRequest); return itacBoardCheckInRequest; } public static void mapAsm2Itac(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest asmBoardCheckInRequest, BoardCheckInRequest itacBoardCheckInRequest) { // skip property ExtensionDataObject, declared in BoardCheckInRequest itacBoardCheckInRequest.BoardId = asmBoardCheckInRequest.BoardId; itacBoardCheckInRequest.CheckInErrorCode = asmBoardCheckInRequest.CheckInErrorCode; itacBoardCheckInRequest.LineName = asmBoardCheckInRequest.LineName; itacBoardCheckInRequest.MostCriticalMSDExpireDate = asmBoardCheckInRequest.MostCriticalMSDExpireDate; itacBoardCheckInRequest.RecipeName = asmBoardCheckInRequest.RecipeName; itacBoardCheckInRequest.ScanTime = asmBoardCheckInRequest.ScanTime; } // maps ASM namespace conform list to iTAC namespace array public static BoardCheckInRequest[] getArray(IList asmBoardCheckInRequest) { if (asmBoardCheckInRequest == null) { return null; } BoardCheckInRequest[] itacBoardCheckInRequest = new BoardCheckInRequest[asmBoardCheckInRequest.Count]; for (int i = 0; i < asmBoardCheckInRequest.Count; i++) { itacBoardCheckInRequest[i] = BoardCheckInRequestMapper.get(asmBoardCheckInRequest[i]); } return itacBoardCheckInRequest; } // maps ASM namespace conform array to iTAC namespace array public static BoardCheckInRequest[] getArray(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.BoardCheckInRequest[] asmBoardCheckInRequest) { if (asmBoardCheckInRequest == null) { return null; } BoardCheckInRequest[] itacBoardCheckInRequest = new BoardCheckInRequest[asmBoardCheckInRequest.Length]; for (int i = 0; i < asmBoardCheckInRequest.Length; i++) { itacBoardCheckInRequest[i] = BoardCheckInRequestMapper.get(asmBoardCheckInRequest[i]); } return itacBoardCheckInRequest; } } }