Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }