Exemple #1
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
            });
        }
Exemple #2
0
        private CellPassesResult.ProfileLayer[] ConvertCellLayers(TICProfileLayers layers, CellPassesResult.FilteredPassData[] allPasses)
        {
            CellPassesResult.ProfileLayer[] result;
            if (layers.Count() == 0)
            {
                result    = new CellPassesResult.ProfileLayer[1];
                result[0] = ConvertCellLayerItem(new TICProfileLayer(), allPasses);
                return(result);
            }

            result = new CellPassesResult.ProfileLayer[layers.Count()];

            int count = 0;

            foreach (TICProfileLayer layer in layers)
            {
                var layerPasses = allPasses.Skip(layer.StartCellPassIdx).Take(layer.EndCellPassIdx - layer.StartCellPassIdx + 1).ToArray();
                result[count++] = ConvertCellLayerItem(layer, layerPasses);
            }

            return(result);
        }