コード例 #1
0
        public async Task <List <string> > GetImagesPath(string sku)
        {
            var model = await _modelParser.ParseFromSku(sku);

            var imagePatterns = JsonConvert.DeserializeObject <List <string> >(model.ImagesPattern);

            return(imagePatterns.Select(p => _variablesEvaluator.EvaluateExpression(p, model)).ToList());
        }
コード例 #2
0
        public async Task <decimal> CalculateExpression(string expression, ConfiguredModel model)
        {
            var evaluatedExpression = _variablesEvaluator.EvaluateExpression(expression, model);

            return(await GetResultFromExpression(evaluatedExpression));
        }