Пример #1
0
 /// <summary>
 /// The GetExpression.
 /// </summary>
 /// <param name="stage">The stage<see cref="int"/>.</param>
 /// <returns>The <see cref="Expression{Func{IFigure, bool}}"/>.</returns>
 public Expression <Func <IFigure, bool> > GetExpression(int stage = 1)
 {
     termsReducer.Clear();
     termsReducer.Add(Reducer.AsEnumerable().Concat(Terms.AsEnumerable()).ToArray());
     expression.Conditions = termsReducer;
     termsBuffer           = termsReducer;
     return(expression.CreateExpression(stage));
 }
        /// <summary>
        /// The Clone.
        /// </summary>
        /// <returns>The <see cref="FilterTerms"/>.</returns>
        public FilterTerms Clone()
        {
            FilterTerms ft = new FilterTerms();

            foreach (FilterTerm t in this)
            {
                FilterTerm _t = new FilterTerm(t.RubricName, t.Operand, t.Value, t.Logic, t.Stage);
                ft.Add(_t);
            }
            return(ft);
        }