Exemple #1
0
        internal Expression GetExpression(ParameterExpression parameter)
        {
            var lhs = Lhs.GetExpression(parameter);
            if (Rhs is null) return lhs;

            var rhs = Rhs.GetExpression(parameter);
            Expression expression = null;

            switch (Gate)
            {
                case LogicGate.And:
                    expression = Expression.And(lhs, rhs);
                    break;
                case LogicGate.Or:
                    expression = Expression.Or(lhs, rhs);
                    break;
                default:
                    break;
            }

            return expression;
        }