public async Task <bool> EvaluateAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { //thinking out-loud //if single rule where truecondition == false, then isTrue = false, set result to false. good that. //if multi-rules mixed... then or is inferred, so if any where truecondition == true, then result = true bool isTrue = this.rules.Any(a => a.TrueCondition); trace.TraceStep(string.Format("Preset:{0}", isTrue)); return(await Task.FromResult(isTrue)); }
public async Task <bool> EvaluateAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { trace.TraceStep("Always True"); return(await Task.FromResult(true)); }
public Task <bool> CompleteAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { trace.TraceStep(Definition.Id); return(Task.FromResult <bool>(true)); }