示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SubMathset"/> class.
        /// </summary>
        /// <param name="evalRubric">The evalRubric<see cref="MathRubric"/>.</param>
        /// <param name="formuler">The formuler<see cref="Mathset"/>.</param>
        public SubMathset(MathRubric evalRubric, Mathset formuler)
        {
            if (evalRubric != null)
            {
                Rubric = evalRubric;
            }

            SetDimensions(formuler);
        }
        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);
        }
 public Mathset(MathRubric rubric)
 {
     Rubric   = rubric;
     Formuler = rubric.Formuler;
 }