public EvaluationResult([CanBeNull] ICanBeAnalyzed obj, bool passed, string description,
                         ICanBeEvaluated archRule, Architecture architecture)
 {
     EvaluatedObject = obj;
     Passed          = passed;
     Description     = description;
     ArchRule        = archRule;
     Architecture    = architecture;
 }
        public static IPredicate <T> AreNot(ICanBeAnalyzed firstObject, params ICanBeAnalyzed[] moreObjects)
        {
            var objects = new List <ICanBeAnalyzed> {
                firstObject
            }.Concat(moreObjects).OfType <T>();
            var description = moreObjects.Aggregate("are not \"" + firstObject.FullName + "\"",
                                                    (current, obj) => current + " or \"" + obj.FullName + "\"");

            return(new EnumerablePredicate <T>(e => e.Except(objects), description));
        }
 public TRuleTypeShouldConjunction AreNot(ICanBeAnalyzed firstObject, params ICanBeAnalyzed[] moreObjects)
 {
     _ruleCreator.ContinueComplexCondition(
         ObjectPredicatesDefinition <TReferenceType> .AreNot(firstObject, moreObjects));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Exemple #4
0
 public ConditionResult(ICanBeAnalyzed analyzedObject, bool pass, string failDescription = null)
 {
     Pass            = pass;
     AnalyzedObject  = analyzedObject;
     FailDescription = pass ? null : failDescription;
 }
 public TGivenRuleTypeConjunction AreNot(ICanBeAnalyzed firstObject, params ICanBeAnalyzed[] moreObjects)
 {
     _ruleCreator.AddPredicate(ObjectPredicatesDefinition <TRuleType> .AreNot(firstObject, moreObjects));
     return(Create <TGivenRuleTypeConjunction, TRuleType>(_ruleCreator));
 }
Exemple #6
0
 public TRuleTypeShouldConjunction Be(ICanBeAnalyzed firstObject, params ICanBeAnalyzed[] moreObjects)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .Be(firstObject, moreObjects));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }