public void Execute(T parameter) { if (_condition.Get(parameter)) { _command.Execute(parameter); } }
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); } } }
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); }
public IQueryable <T> Execute <T>(ICondition <T> condition) where T : class, IDictionaryEntity { return(_dbContext .Set <T>() .Where(x => condition.Get(x))); }