コード例 #1
0
        /// <summary>
        /// Takes an expression tree node and returns if the node is a variable node type.
        /// </summary>
        /// <param name="node">Expression tree node.</param>
        /// <returns>Bool that represents is the node is a constant or variable node type.</returns>
        private bool IsVariableNode(ExpressionTreeNode node)
        {
            Type nodeType = node.GetType();

            return(nodeType.Equals(typeof(VariableNode)));
        }
コード例 #2
0
        /// <summary>
        /// Takes an expression tree node and returns if the node is a constant node type.
        /// </summary>
        /// <param name="node">Expression tree node.</param>
        /// <returns>Bool that represents is the node is a constant or variable node type.</returns>
        private bool IsConstantNode(ExpressionTreeNode node)
        {
            Type nodeType = node.GetType();

            return(nodeType.Equals(typeof(ConstantNode)));
        }