Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExpressionTree"/> class.
 /// </summary>
 /// <param name="expression">Expression to construct tree.</param>
 public ExpressionTree(string expression)
 {
     this.operatorsRegex = this.CreateOperatorRegex();
     this.Expression     = expression;
     this.factory        = new OperatorNodeFactory();
 }
        public void TestCreateOperatorNode(string op, Type nodeType)
        {
            OperatorNodeFactory factory = new OperatorNodeFactory();

            Assert.AreEqual(nodeType, factory.CreateOperatorNode(op).GetType());
        }