Esempio n. 1
0
 public void Execute(T parameter)
 {
     if (_condition.Get(parameter))
     {
         _command.Execute(parameter);
     }
 }
Esempio n. 2
0
        public IEnumerable <Type> Get(Type parameter)
        {
            var select = _selections(parameter);
            var length = _types.Length;

            for (var i = 0u; i < length; i++)
            {
                var type = select.Get(_types[i]);
                if (_condition.Get(type))
                {
                    yield return(type);
                }
            }
        }
Esempio n. 3
0
        public ConstructorInfo Get(TypeInfo parameter)
        {
            var constructors = _constructors.Get(parameter).ToArray();
            var length       = constructors.Length;

            for (var i = 0u; i < length; i++)
            {
                var constructor = constructors[i];
                if (_condition.Get(constructor))
                {
                    return(constructor);
                }
            }

            return(null);
        }
        public void Execute(T parameter)
        {
            var command = _condition.Get(parameter) ? _true : _false;

            command.Execute(parameter);
        }
Esempio n. 5
0
 public IQueryable <T> Execute <T>(ICondition <T> condition) where T : class, IDictionaryEntity
 {
     return(_dbContext
            .Set <T>()
            .Where(x => condition.Get(x)));
 }