public async Task ExecuteAsync(RuleImp rule) { foreach (var item in Order.Items) { this.GetService <OrderStateService>().CurrentOrderItem = item; await RuleExecutor.ExecuteAsync(this, rule); } }
public static async Task ExecuteAsync(IContext context, RuleImp rule) { using (context.GetService <IExecutionControlService>().CreateExecutionScope()) await rule.ExecuteAsync(context); }