Ejemplo n.º 1
0
        public static bool TryParseOperationType(this string input, out statisticCalculation calculation)
        {
            calculation = statisticCalculation.Invalid;
            var result = true;

            switch (input.ToLower().Trim())
            {
            case "minvalue":
                calculation = statisticCalculation.MinValue;
                break;

            case "maxvalue":
                calculation = statisticCalculation.MaxValue;
                break;

            case "average":
                calculation = statisticCalculation.Average;
                break;

            default:
                result = false;
                break;
            }
            return(result);
        }
Ejemplo n.º 2
0
        private List <TotalTempLine> buildSet(string variable, statisticCalculation op, double[] values)
        {
            var testData = new List <TotalTempLine>();

            foreach (var val in values)
            {
                testData.Add(new TotalTempLine()
                {
                    HasOperation     = true,
                    OperationType    = op,
                    VariableType     = variable,
                    ValueOfRelevance = val
                });
            }

            return(testData);
        }