Ejemplo n.º 1
0
        protected override async Task <ContractExecutionResult> ProcessAsyncEx <T>(T item)
        {
            var request = CastRequestObjectTo <CellPassesRequest>(item);
            CellPassesV2Result result = null;

#if RAPTOR
            if (UseTRexGateway("ENABLE_TREX_GATEWAY_CELL_PASSES"))
            {
#endif
            result = await GetTRexCellPasses(request);

            if (result != null)
            {
                return(result);
            }
            throw CreateServiceException <CellPassesV2Executor>();

#if RAPTOR
        }

        result = GetRaptorResult(request);
        if (result != null)
        {
            return(result);
        }
        throw CreateServiceException <CellPassesV2Executor>();
#endif
        }
Ejemplo n.º 2
0
        private CellPassesResult ConvertTRexResult(CellPassesV2Result result)
        {
            // Convert layers...
            var layers = new CellPassesResult.ProfileLayer[result.Layers.Length];

            for (var i = 0; i < result.Layers.Length; i++)
            {
                layers[i] = AutoMapperUtility.Automapper.Map <CellPassesResult.ProfileLayer>(result.Layers[i]);
            }

            return(new CellPassesResult()
            {
                Layers = layers
            });
        }