public virtual bool IsValid(IActivationRule rule, IInstanceResolver resolver, IServiceLocatorStore context) { var items = MergeContextItems(context); for (int i = 0; i < items.Count; i++) { var contextItem = items[i]; if (rule.Evaluate(resolver, contextItem)) return true; } return false; }
public bool IsValid(IActivationRule rule, IInstanceResolver resolver, IServiceLocatorStore context) { var types = context.Get<IExecutionStore>().RequestedTypes; for(int i = 0; i < types.Count; i++) { var dependency = types[i]; if (rule.Evaluate(resolver, dependency)) return true; } return false; }
public bool IsValid(IActivationRule rule, IInstanceResolver resolver, IServiceLocatorStore context) { var types = context.Get <IExecutionStore>().RequestedTypes; for (int i = 0; i < types.Count; i++) { var dependency = types[i]; if (rule.Evaluate(resolver, dependency)) { return(true); } } return(false); }
public virtual bool IsValid(IActivationRule rule, IInstanceResolver resolver, IServiceLocatorStore context) { var items = MergeContextItems(context); for (int i = 0; i < items.Count; i++) { var contextItem = items[i]; if (rule.Evaluate(resolver, contextItem)) { return(true); } } return(false); }