Beispiel #1
0
        /// <summary>
        /// Initializes an Instance of FormulaEntry with Given FormulaEntries
        /// </summary>
        /// <param name="formulaEntries">Collection Of <b>InlineFormulaEntry</b> to Initialize Formula with
        /// <seealso cref="InlineFormulaEntry"/></param>
        public InlineFormula(IEnumerable <InlineFormulaEntry> formulaEntries)
        {
            if (formulaEntries is null)
            {
                throw new ArgumentNullException(nameof(formulaEntries));
            }

            InlineFormulaHelper.SortAndValidateEntryOrder(formulaEntries.ToList());

            this._underlyingCollection = new SortedSet <InlineFormulaEntry>(formulaEntries, this);
        }
Beispiel #2
0
        private IEnumerable <InlineFormulaEntry> ParseFormula(IEnumerable <InlineFormulaTokenIndexDto> inlineFormulaTokenCollection)
        {
            List <InlineFormulaEntry> toReturn = null;

            if (inlineFormulaTokenCollection != null)
            {
                toReturn = inlineFormulaTokenCollection.Select(entry => InlineFormulaHelper.ParseAndBuildInlineFormulaEntry(entry)).ToList();
            }

            InlineFormulaHelper.SortAndValidateEntryOrder(toReturn);

            return(toReturn);
        }