public bool IsSatisfiedBy(TEntity entity, Execute execute) { var result = true; if (!Condition(entity)) { return(result); } var executeInternal1 = new Execute(); var executeInternal2 = new Execute(); var result1 = Spec1.IsSatisfiedBy(entity, executeInternal1); var result2 = Spec2.IsSatisfiedBy(entity, executeInternal2); result = result1 || result2; if (!result && execute != null) { execute.AddMessage(executeInternal1); execute.AddMessage(executeInternal2); } return(result); }
public bool Is(T candidate) { return(Spec1.IsSatisfiedBy(candidate) || Spec2.IsSatisfiedBy(candidate)); }
public new bool IsSatisfiedBy(T candidate) { return(Spec1.IsSatisfiedBy(candidate) && Spec2.IsSatisfiedBy(candidate)); }
public new bool IsSatisfiedBy(TEntity candidate) { return(Spec1.IsSatisfiedBy(candidate) || Spec2.IsSatisfiedBy(candidate)); }