예제 #1
0
        public override Task <IRuleResult> InvokeAsync()
        {
            var ruleResult = new RuleResult();

            if (UnhandledException?.GetType() == typeof(Exception))
            {
                ruleResult.Error = new Error {
                    Exception = UnhandledException
                };
            }

            return(RuleResult.CreateAsync(ruleResult));
        }
예제 #2
0
        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 } }
            }));
        }
예제 #3
0
 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 }));
 }