public Mathset this[MemberRubric rubric]
 {
     get
     {
         return(GetMathset(rubric));
     }
 }
        private string GetTypeString(MemberRubric column)
        {
            Type   dataType = column.RubricType;
            string type     = "string";

            if (dataType == typeof(string))
            {
                type = "string";
            }
            else if (dataType == typeof(int))
            {
                type = "int";
            }
            else if (dataType == typeof(decimal))
            {
                type = "decimal";
            }
            else if (dataType == typeof(DateTime))
            {
                type = "DateTime";
            }
            else if (dataType == typeof(Single))
            {
                type = "Single";
            }
            else if (dataType == typeof(float))
            {
                type = "float";
            }
            else
            {
                type = "string";
            }
            return(type);
        }
Esempio n. 3
0
 public Mathline this[MemberRubric rubric]
 {
     get
     {
         return(GetMathline(rubric));
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FilterTerm"/> class.
 /// </summary>
 /// <param name="filterColumn">The filterColumn<see cref="MemberRubric"/>.</param>
 /// <param name="operand">The operand<see cref="OperandType"/>.</param>
 /// <param name="value">The value<see cref="object"/>.</param>
 /// <param name="logic">The logic<see cref="LogicType"/>.</param>
 /// <param name="stage">The stage<see cref="FilterStage"/>.</param>
 public FilterTerm(MemberRubric filterColumn, OperandType operand, object value, LogicType logic = LogicType.And, FilterStage stage = FilterStage.First)
 {
     Operand      = operand;
     Value        = value;
     Logic        = logic;
     ValueType    = filterColumn.RubricType;
     RubricName   = filterColumn.RubricName;
     FilterRubric = filterColumn;
     Stage        = stage;
 }
        public Mathset GetMathset(string name)
        {
            MemberRubric rubric = null;

            if (computation.Rubrics.TryGet(name, out rubric))
            {
                MathRubric mathrubric = null;
                if (computation.MathsetRubrics.TryGet(name, out mathrubric))
                {
                    return(mathrubric.GetMathset());
                }
                return(computation.Put(rubric.Name, new MathRubric(computation, rubric)).Value.GetMathset());
            }
            return(null);
        }
        public Mathset GetMathset(int id)
        {
            MemberRubric rubric = computation.Rubrics[id];

            if (rubric != null)
            {
                MathRubric mathrubric = null;
                if (computation.MathsetRubrics.TryGet(rubric.Name, out mathrubric))
                {
                    return(mathrubric.GetMathset());
                }
                return(computation.Put(rubric.Name, new MathRubric(computation, rubric)).Value.GetMathset());
            }
            return(null);
        }
Esempio n. 7
0
        public Mathline GetMathline(string name)
        {
            MemberRubric rubric = null;

            if (reckoning.Rubrics.TryGet(name, out rubric))
            {
                MathRubric mathrubric = null;
                if (reckoning.MathlineRubrics.TryGet(name, out mathrubric))
                {
                    return(mathrubric.GetMathline());
                }
                return(reckoning.Put(rubric.Name, new MathRubric(reckoning, rubric)).Value.GetMathline());
            }
            return(null);
        }
Esempio n. 8
0
        public FilterTerm(IFigures figures, string filterColumn, string operand, object value, string logic = "And", int stage = 1)
        {
            RubricName = filterColumn;
            OperandType tempOperand1;

            Enum.TryParse(operand, true, out tempOperand1);
            Operand = tempOperand1;
            Value   = value;
            LogicType tempLogic;

            Enum.TryParse(logic, true, out tempLogic);
            Logic      = tempLogic;
            collection = figures;
            if (figures != null)
            {
                MemberRubric[] filterRubrics = collection.Rubrics.AsValues().Where(c => c.RubricName == RubricName).ToArray();
                if (filterRubrics.Length > 0)
                {
                    FilterRubric = filterRubrics[0]; ValueType = FilterRubric.RubricType;
                }
            }
            Stage = (FilterStage)Enum.ToObject(typeof(FilterStage), stage);
        }
 public SortTerm(MemberRubric sortedRubric, SortDirection direction = SortDirection.ASC, int ordinal = 0)
 {
     Direction    = direction;
     SortedRubric = sortedRubric;
     RubricId     = ordinal;
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MathRubric"/> class.
 /// </summary>
 /// <param name="rubrics">The rubrics<see cref="MathRubrics"/>.</param>
 /// <param name="rubric">The rubric<see cref="MemberRubric"/>.</param>
 public MathRubric(MathRubrics rubrics, MemberRubric rubric)
 {
     memberRubric    = rubric;
     mathlineRubrics = rubrics;
     SerialCode      = rubric.SerialCode;
 }
 public bool ContainsFirst(MemberRubric rubric)
 {
     return(computation.First.Value.RubricName == rubric.Name);
 }
 public Mathset GetMathset(MemberRubric rubric)
 {
     return(GetMathset(rubric.Name));
 }
Esempio n. 13
0
 public Mathline GetMathline(MemberRubric rubric)
 {
     return(GetMathline(rubric.Name));
 }