Example #1
0
        public IList <AccountGroup> SelectGroups(IList <SelectorDefinition> selectors, IDictionary <int, List <RuleFilterDefinition> > dicFilters, RuleContext ruleContext)
        {
            IList <AccountGroup>       collected         = new List <AccountGroup>();
            IList <SelectorDefinition> matchingSelectors = FindMatchingSelectors(selectors, dicFilters, ruleContext);

            IAccountStore accountStore = _accountManager.GetStore();

            foreach (SelectorDefinition selectorDefinition in matchingSelectors)
            {
                collected.Add(accountStore.GetGroup(selectorDefinition.GroupId));
            }

            return(collected);
        }
Example #2
0
        public IList <AccountGroup> SelectGroups(IList <SelectorDefinition> selectors, RuleContext ruleContext)
        {
            IList <AccountGroup>       collected         = new List <AccountGroup>();
            IList <SelectorDefinition> matchingSelectors = FindMatchingSelectors(selectors, ruleContext);

            IAccountStore accountStore = _accountManager.GetStore();

            foreach (SelectorDefinition selectorDefinition in matchingSelectors)
            {
                AccountGroup accountGroup = accountStore.GetGroup(selectorDefinition.GroupId);
                collected.Add(accountGroup);
            }

            return(collected);
        }