Ejemplo n.º 1
0
        public ILogicResult Combine(ILogicResult other)
        {
            LogicResult result = new LogicResult(this.PassRating + other.PassRating);

            this.type = 1;
            return(result);
        }
Ejemplo n.º 2
0
 public LogicResult(ILogicResult result)
 {
     this.Model               = default(T);
     this.Exceptions          = result.Exceptions;
     this.MessageText         = result.MessageText;
     this.FriendlyMessageText = result.FriendlyMessageText;
     this.Severity            = result.Severity;
 }
Ejemplo n.º 3
0
        public virtual void Set(Func <double> aValue)
        {
            var tmp = m_NumberVal as DelegateNumber;

            if (tmp == null)
            {
                tmp = new DelegateNumber();
            }
            tmp.callback = aValue;
            m_NumberVal  = tmp;
            m_BoolVal    = null;
        }
Ejemplo n.º 4
0
        public virtual void Set(double aValue)
        {
            var tmp = m_NumberVal as ConstantNumber;

            if (tmp == null)
            {
                tmp = new ConstantNumber();
            }
            tmp.constantValue = aValue;
            m_NumberVal       = tmp;
            m_BoolVal         = null;
        }
Ejemplo n.º 5
0
        } //ParseNumber(string, int)

        public LogicExpression Parse(string aExpressionString, ExpressionContext aContext = null)
        {
            var old = context;

            if (aContext != null)
            {
                context = aContext;
            }
            ILogicResult    tree = ParseLogicResult(aExpressionString, 20);
            LogicExpression res  = new LogicExpression(tree, context);

            if (aContext != null)
            {
                context = old;
            }
            return(res);
        }
Ejemplo n.º 6
0
        public ILogicResult Add(ILogicResult other)
        {
            LogicResult result = new LogicResult(this.ToInt32 + other.ToInt32);

            return(result);
        }
Ejemplo n.º 7
0
        public ILogicResult Subtract(ILogicResult other)
        {
            LogicResult result = new LogicResult(this.ToInt32 - other.ToInt32);

            return(result);
        }
Ejemplo n.º 8
0
 public int CompareTo(ILogicResult other)
 {
     return(this.ToInt32.CompareTo(other.ToInt32));
 }
Ejemplo n.º 9
0
 public LogicLeaf(string operation, ILogicResult value)
 {
     this.singleValue = value;
     this.operation   = operation;
 }
Ejemplo n.º 10
0
 public LogicLeaf(ILogicResult value)
 {
     this.singleValue = value;
 }
Ejemplo n.º 11
0
 public LogicExpression(ILogicResult aExpressionTree, ExpressionContext aContext)
 {
     expressionTree = aExpressionTree;
     context        = aContext;
 }
 public virtual void Set(INumberProvider provider)
 {
     m_NumberVal = provider;
     m_BoolVal   = null;
 }