/// <summary> /// Creates a new context from a passed in Context Id /// </summary> /// <param name="contextId"></param> /// <param name="ruleExecuter"></param> /// <param name="ruleRepository"></param> /// <param name="ruleTemplateFactory"></param> /// <returns></returns> public static async Task <RuleContext <TFact, TOutput> > CreateContext( Guid contextId, IRuleExecuter <TFact, TOutput> ruleExecuter, IRuleRepository ruleRepository, IRuleTemplateFactory <TFact, TOutput> ruleTemplateFactory) { await ruleRepository.AddContext(contextId); return(new RuleContext <TFact, TOutput>(ruleExecuter, ruleRepository, contextId, ruleTemplateFactory)); }