Ejemplo n.º 1
0
        public Expression Visit(LogicAnd op)
        {
            var left  = (LogicExpression)op.Left.Accept(this);
            var right = (LogicExpression)op.Right.Accept(this);

            return(new LogicAnd(left, right));
        }
Ejemplo n.º 2
0
        public SortedSet <string> Visit(LogicAnd op)
        {
            var vars = Run(op.Left);

            vars.UnionWith(Run(op.Right));
            return(vars);
        }
Ejemplo n.º 3
0
        protected override MetricBooleanExpression.IMetricBooleanExpression BuildExpression()
        {
            IMetricBooleanExpression expression =
                new LogicAnd(
                    new Comparison(
                        string.Format(
                            "{0} >= {1:0.0000}",
                            RawMetric,
                            LowThreshold)),
                    new Comparison(
                        string.Format(
                            "{0} <= {1:0.0000}",
                            RawMetric,
                            HighThreshold)));

            if (TriggeringCondition == 0)
            {
                expression = new LogicNot(expression);
            }

            return(expression);
        }
Ejemplo n.º 4
0
 public T Visit(LogicAnd op)
 {
     op.Left.Accept(this);
     op.Right.Accept(this);
     return(default(T));
 }
Ejemplo n.º 5
0
        public async Task <Value> Visit(LogicAnd op)
        {
            Value[] results = await Task.WhenAll <Value>(op.Left.Accept(this), op.Right.Accept(this));

            return(new BoolValue(results.All(b => ((BoolValue)b).Value)));
        }