Example #1
0
        private AnalyzedStepParameter AnalyzeParameter(string value, CultureInfo bindingCulture, int paramIndex, string regexPattern)
        {
            string paramName = StepParameterNameGenerator.GenerateParameterName(value, paramIndex, _usedParameterNames);

            if (int.TryParse(value, NumberStyles.Integer, bindingCulture, out _))
            {
                return(new AnalyzedStepParameter("Int32", paramName, regexPattern));
            }

            if (decimal.TryParse(value, NumberStyles.Number, bindingCulture, out _))
            {
                return(new AnalyzedStepParameter("Decimal", paramName, regexPattern));
            }

            return(new AnalyzedStepParameter("String", paramName, regexPattern));
        }
Example #2
0
        private AnalyzedStepParameter AnalyzeParameter(int paramIndex, RecognizedTextType textType, string paramValue)
        {
            string paramName = StepParameterNameGenerator.GenerateParameterName(paramValue, paramIndex, _usedParameterNames);

            return(CreateStepParameter(textType, paramName));
        }