public override Task <IRuleResult> InvokeAsync() { var ruleResult = new RuleResult(); if (UnhandledException?.GetType() == typeof(Exception)) { ruleResult.Error = new Error { Exception = UnhandledException }; } return(RuleResult.CreateAsync(ruleResult)); }
public override async Task <IRuleResult> InvokeAsync() { var description = TryGetValueAsync("Description").Result.To <string>(); Model.Description = $"Product {description}"; return(await RuleResult.CreateAsync(new RuleResult { Name = "ProductRule", Result = Model.Description, Data = { { "Description", description } } })); }
public override async Task <IRuleResult> InvokeAsync() { return(await RuleResult.CreateAsync(new RuleResult { Result = DateTime.Now.Ticks })); }
public override async Task <IRuleResult> InvokeAsync() { return(await RuleResult.CreateAsync(new RuleResult())); }
public override async Task <IRuleResult> InvokeAsync() { Model.Description = "Product Description"; return(await RuleResult.CreateAsync(new RuleResult { Name = "ProductRule", Result = Model.Description })); }