C# Class DataServer.SqlProcessing.SqlQueryOptions

In case we wish to have an iterative query, employ this class to set its options. Basically, we have four inputs and one output: - An input parameter that is varied until the desired result is reached. - An input parameter that contains the desired result. - An input parameter that determines the accuracy of the desired result. - An input parameter that determines the maximum number of tries. - An output parameter that contains the actual result.
ファイルを表示 Open project: TNOCS/csTouch Class Usage Examples

Public Methods

Method Description
ComputeDesiredResult ( BaseContent poi, List sqlInputParameters, bool updateMathFormula = false ) : double

Compute the desired result based on the formula

Private Methods

Method Description
CalculateResult ( BaseContent bc, object mathFormula ) : double

Calculate the results using the created formula. Note that you can have up to 8 parameters.

GetSensorValue ( BaseContent bc, string key ) : double

Try to parse the label to a double using either the invariant or the Dutch culture.

MathFormula ( IReadOnlyList sqlInputParameters ) : object

Converts the formula to a standard form, i.e. {4}*{5} => a*b Where a is inputParameters[0], b is inputParameters[1], etc.

Method Details

ComputeDesiredResult() public method

Compute the desired result based on the formula
public ComputeDesiredResult ( BaseContent poi, List sqlInputParameters, bool updateMathFormula = false ) : double
poi BaseContent
sqlInputParameters List
updateMathFormula bool If true, forces to re-evaluate the math formula.
return double