public ILogicResult Combine(ILogicResult other) { LogicResult result = new LogicResult(this.PassRating + other.PassRating); this.type = 1; return(result); }
public LogicResult(ILogicResult result) { this.Model = default(T); this.Exceptions = result.Exceptions; this.MessageText = result.MessageText; this.FriendlyMessageText = result.FriendlyMessageText; this.Severity = result.Severity; }
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; }
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; }
} //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); }
public ILogicResult Add(ILogicResult other) { LogicResult result = new LogicResult(this.ToInt32 + other.ToInt32); return(result); }
public ILogicResult Subtract(ILogicResult other) { LogicResult result = new LogicResult(this.ToInt32 - other.ToInt32); return(result); }
public int CompareTo(ILogicResult other) { return(this.ToInt32.CompareTo(other.ToInt32)); }
public LogicLeaf(string operation, ILogicResult value) { this.singleValue = value; this.operation = operation; }
public LogicLeaf(ILogicResult value) { this.singleValue = value; }
public LogicExpression(ILogicResult aExpressionTree, ExpressionContext aContext) { expressionTree = aExpressionTree; context = aContext; }
public virtual void Set(INumberProvider provider) { m_NumberVal = provider; m_BoolVal = null; }