public async Task <bool> CompleteAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { TModel model = scope.GetModel(); await scope.RunWorkflowAsync <TModel>(this.builder, model, token); scope.SetModel(model); return(await Task.FromResult(true)); }
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 <string> scope, IEngineTrace trace, CancellationToken token) { return(await Task.FromResult(true)); }
public async Task <bool> CompleteAsync(IEngineScope <string> scope, IEngineTrace trace, CancellationToken token) { Console.WriteLine("did it"); return(true); }
public async Task ValidateAsync(IEngineScope <TModel> scope, IEngineTrace trace, IRuleResult result, CancellationToken token) { await this.validator(scope, trace, result, token); }
public async Task <bool> EvaluateAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { return(await this.evaluator(scope, trace, token)); }
public async Task <bool> CompleteAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { return(await this.action(scope, trace, token)); }
public async Task <bool> EvaluateAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { trace.TraceStep("Always True"); return(await Task.FromResult(true)); }
public async Task <bool> CompleteAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { return(await Task.FromResult <bool>(true)); }
public Task <bool> CompleteAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token) { trace.TraceStep(Definition.Id); return(Task.FromResult <bool>(true)); }