public async Task <RuleTree> GetQuoteItemRuleTree() { var sBizRulesUrl = _rulesEngineInitializer.GetQuoteItemBizRulesFileUrl(); RuleTreeSeed quoteItemTreeSeed = new RuleTreeSeed("QuoteItemTree", sBizRulesUrl, "default") { Id = 2 }; var RuleTreeIsCached = await _ruleTreeRepository.ContainsAsync(quoteItemTreeSeed.Id).ConfigureAwait(false); if (RuleTreeIsCached) { return(await _ruleTreeRepository.GetByIdAsync(quoteItemTreeSeed.Id).ConfigureAwait(false)); } else { var DomainSeed = new RulesDomainSeed(new HashSet <Type>() { typeof(Quote), typeof(QuoteItem) }); return(await CreateRuleTreeAsync(new RulesDomain(DomainSeed), quoteItemTreeSeed).ConfigureAwait(false)); } }
public async Task <RulesDomain> CreateRulesDomainAsync(RulesDomainSeed domainSeed) { // TODO: Do all the work to help initialize the RuleTree return(new RulesDomain(domainSeed)); }