/* ---------------------------------------------------------------- */
        // SingleStatement
        /* ---------------------------------------------------------------- */
        public static SingleStatement CreateSingleStatement(
            TargetState target,
            Operator inOperator,
            Expression inExpression)
        {
            /* Expression */
            var expression = new Expression(
                ExpressionType.OperatorExpression,
                CreateExpressionValue_EMPTY(),
                CreateOperatorExpression(inOperator, inExpression));

            return(new SingleStatement(target, expression));
        }
        public static SingleStatement CreateSingleStatement_CALCULATE(
            TargetState target,
            Operator inOperator,
            Expression inExpression_1st,
            Expression inExpression_2nd)
        {
            /* Expression */
            var expression = new Expression(
                ExpressionType.OperatorExpression,
                CreateExpressionValue_CALCULATE(),
                CreateOperatorExpression(inOperator, inExpression_1st, inExpression_2nd));

            return(new SingleStatement(target, expression));
        }
        public static SingleStatement CreateSingleStatement_SETVALUE_FROM_KEY(
            TargetState target,
            string sourceKey)
        {
            /* Expression */
            var expression = new Expression(
                ExpressionType.Value,
                CreateExpressionValue_SETVALUE_FROM_KEY(target.ParameterType, sourceKey),
                CreateOperatorExpression(
                    Operator.Not,
                    CreateExpression_CONSTANT(new ConstantValue(false))));

            return(new SingleStatement(target, expression));
        }
        public static SingleStatement CreateSingleStatement_SETVALUE(
            TargetState target,
            ExpressionValue value)
        {
            /* Expression */
            var expression = new Expression(
                ExpressionType.Value,
                value,
                CreateOperatorExpression(
                    Operator.Not,
                    CreateExpression_CONSTANT(new ConstantValue(false))));

            return(new SingleStatement(target, expression));
        }
        public static SingleStatement CreateSingleStatement_SETVALUE_BY_COMPARE(
            TargetState target,
            Expression inExpression_1st,
            Operator ope,
            Expression inExpression_2nd)
        {
            /* Expression */
            var expression = new Expression(
                ExpressionType.OperatorExpression,
                CreateExpressionValue_COMPARE(),
                CreateOperatorExpression(
                    ope,
                    inExpression_1st,
                    inExpression_2nd));

            return(new SingleStatement(target, expression));
        }
Example #6
0
 public SingleStatement(TargetState targetState, Expression expression)
 {
     TargetState = targetState;
     Expression  = expression;
 }