本文整理汇总了C#中IEvaluator.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# IEvaluator.GetType方法的具体用法?C# IEvaluator.GetType怎么用?C# IEvaluator.GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEvaluator
的用法示例。
在下文中一共展示了IEvaluator.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: evaluate
/// <summary>
/// Evaluation user-variable with IEvaluator by using unique identification
/// Evaluated value should be updated for variable.
/// </summary>
/// <param name="ident">Unique identificator</param>
/// <param name="evaluator">IEvaluator objects for evaluating</param>
/// <param name="resetting">Evaluating from the unevaluated data if true, otherwise evaluation in the chain of others IEvaluator's</param>
public void evaluate(string ident, IEvaluator evaluator, bool resetting)
{
lock(_lock)
{
if(!definitions.ContainsKey(ident)) {
throw new NotFoundException("Variable '{0}' is not found.", ident);
}
if(evaluator == null) {
throw new InvalidArgumentException("Evaluation of variable: evaluator is null");
}
TUserVariable var = new TUserVariable(definitions[ident]) {
status = TUserVariable.StatusType.Started
};
definitions[ident] = var;
if(resetting) {
var.evaluated = evaluator.evaluate(var.unevaluated);
}
else {
var.evaluated = evaluator.evaluate(var.evaluated);
}
var.status = TUserVariable.StatusType.Evaluated;
definitions[ident] = var;
Log.Trace("IEvaluator '{0}': Evaluation of variable '{1}' is completed.", evaluator.GetType().ToString(), ident);
}
}