Exemple #1
0
        public virtual IEnumerable <string> GetParameters()
        {
            var parser     = new FormulaParser();
            var parameters = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            if (!String.IsNullOrWhiteSpace(Settings.PageSize))
            {
                parser.GetParameters(Settings.PageSize).ForEach((p, i) => parameters.Add(p));
            }
            if (!String.IsNullOrWhiteSpace(Settings.PageNumber))
            {
                parser.GetParameters(Settings.PageNumber).ForEach((p, i) => parameters.Add(p));
            }

            if (Settings.Filters != null)
            {
                foreach (var filter in Settings.Filters)
                {
                    foreach (var value in filter.ParameterValues)
                    {
                        if (!String.IsNullOrWhiteSpace(value.ParameterValue))
                        {
                            parser.GetParameters(value.ParameterValue).ForEach((p, i) => parameters.Add(p));
                        }
                    }
                }
            }

            return(parameters);
        }