示例#1
0
        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));
        }
示例#2
0
 public async Task <bool> EvaluateAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token)
 {
     trace.TraceStep("Always True");
     return(await Task.FromResult(true));
 }
示例#3
0
文件: FakeAction.cs 项目: mchnry/flow
 public Task <bool> CompleteAsync(IEngineScope <TModel> scope, IEngineTrace trace, CancellationToken token)
 {
     trace.TraceStep(Definition.Id);
     return(Task.FromResult <bool>(true));
 }