Exemplo n.º 1
0
        public void Resolve()
        {
            this.CoercePredicateActions();
            using (var context = new ApplicationDbContext())
            {
                var se = new ResourceSearchEngine(context);
                this.ConsequentResources = se.FindResources(this.Consequent.ObjectKeywords).ToList();
                this.ConditionalResource = se.FindResources(this.Condition.ObjectKeywords).FirstOrDefault();

                var possibleGroups = se.FindGroups(this.Consequent.ObjectKeywords);
                this.ConsequentResources.AddRange(possibleGroups.SelectMany(x => x.Resources));
            }
        }
Exemplo n.º 2
0
 private void Initialize()
 {
     this.ConsequentResources = new List <Cygnus.Models.Api.Resource>();
     this.ConditionalResource = null;
 }