Beispiel #1
0
 public TRuleTypeShouldConjunction FollowCustomCondition(Func <TRuleType, bool> condition, string description,
                                                         string failDescription)
 {
     _ruleCreator.AddCondition(
         ObjectConditionsDefinition <TRuleType> .FollowCustomCondition(condition, description, failDescription));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #2
0
 public TRuleTypeShouldConjunction NotHaveAnyAttributes(Attribute firstAttribute,
                                                        params Attribute[] moreAttributes)
 {
     _ruleCreator.AddCondition(
         ObjectConditionsDefinition <TRuleType> .NotHaveAnyAttributes(firstAttribute, moreAttributes));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #3
0
 public TRuleTypeShouldConjunction CallAny(IEnumerable <string> patterns,
                                           bool useRegularExpressions = false)
 {
     _ruleCreator.AddCondition(
         ObjectConditionsDefinition <TRuleType> .CallAny(patterns, useRegularExpressions));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #4
0
 public TRuleTypeShouldConjunction CallAny(IObjectProvider <MethodMember> methods)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .CallAny(methods));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #5
0
 public TRuleTypeShouldConjunction NotHaveFullNameContaining(string pattern)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotHaveFullNameContaining(pattern));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #6
0
        //Relation Condition Negations

        public ShouldRelateToTypesThat <TRuleTypeShouldConjunction, IType, TRuleType> NotDependOnAnyTypesThat()
        {
            _ruleCreator.BeginComplexCondition(ArchRuleDefinition.Types(true),
                                               ObjectConditionsDefinition <TRuleType> .NotDependOnAnyTypesThat());
            return(new ShouldRelateToTypesThat <TRuleTypeShouldConjunction, IType, TRuleType>(_ruleCreator));
        }
Beispiel #7
0
 public TRuleTypeShouldConjunction BeProtectedInternal()
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .BeProtectedInternal());
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #8
0
 public TRuleTypeShouldConjunction NotHaveFullName(string fullname)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotHaveFullName(fullname));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #9
0
 public TRuleTypeShouldConjunction HaveName(string name)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .HaveName(name));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #10
0
 public TRuleTypeShouldConjunction HaveNameMatching(string pattern)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .HaveNameMatching(pattern));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #11
0
 public TRuleTypeShouldConjunction OnlyHaveAttributes(IObjectProvider <Attribute> attributes)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .OnlyHaveAttributes(attributes));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #12
0
 public TRuleTypeShouldConjunction Exist()
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .Exist());
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #13
0
 public TRuleTypeShouldConjunction OnlyDependOn(IObjectProvider <IType> types)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .OnlyDependOn(types));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #14
0
 public TRuleTypeShouldConjunction NotHaveAnyAttributes(IEnumerable <Type> attributes)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotHaveAnyAttributes(attributes));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #15
0
 public TRuleTypeShouldConjunction NotBe(IEnumerable <ICanBeAnalyzed> objects)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotBe(objects));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #16
0
 public TRuleTypeShouldConjunction Be(IObjectProvider <ICanBeAnalyzed> objects)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .Be(objects));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #17
0
 public TRuleTypeShouldConjunction Be(ICanBeAnalyzed firstObject, params ICanBeAnalyzed[] moreObjects)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .Be(firstObject, moreObjects));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #18
0
 public TRuleTypeShouldConjunction NotHaveNameStartingWith(string pattern)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotHaveNameStartingWith(pattern));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #19
0
 public TRuleTypeShouldConjunction NotCallAny(IEnumerable <MethodMember> methods)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotCallAny(methods));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #20
0
 public TRuleTypeShouldConjunction NotBePrivateProtected()
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotBePrivateProtected());
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #21
0
 public TRuleTypeShouldConjunction NotDependOnAny(Type firstType, params Type[] moreTypes)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotDependOnAny(firstType, moreTypes));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #22
0
 public ShouldRelateToAttributesThat <TRuleTypeShouldConjunction, TRuleType> NotHaveAnyAttributesThat()
 {
     _ruleCreator.BeginComplexCondition(Attributes(true),
                                        ObjectConditionsDefinition <TRuleType> .NotHaveAnyAttributesThat());
     return(new ShouldRelateToAttributesThat <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #23
0
 public TRuleTypeShouldConjunction NotDependOnAny(IEnumerable <Type> types)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .NotDependOnAny(types));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #24
0
 public TRuleTypeShouldConjunction CallAny(MethodMember method, params MethodMember[] moreMethods)
 {
     _ruleCreator.AddCondition(ObjectConditionsDefinition <TRuleType> .CallAny(method, moreMethods));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #25
0
 public TRuleTypeShouldConjunction NotHaveAnyAttributes(string pattern, bool useRegularExpressions = false)
 {
     _ruleCreator.AddCondition(
         ObjectConditionsDefinition <TRuleType> .NotHaveAnyAttributes(pattern, useRegularExpressions));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
Beispiel #26
0
 public TRuleTypeShouldConjunction DependOnAny(string pattern, bool useRegularExpressions = false)
 {
     _ruleCreator.AddCondition(
         ObjectConditionsDefinition <TRuleType> .DependOnAny(pattern, useRegularExpressions));
     return(Create <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
 }
        //Relation Condition Negations


        public ShouldRelateToMethodMembersThat <TRuleTypeShouldConjunction, TRuleType> NotCallAnyMethodsThat()
        {
            _ruleCreator.BeginComplexCondition(MethodMembers(),
                                               ObjectConditionsDefinition <TRuleType> .NotCallAnyMethodsThat());
            return(new ShouldRelateToMethodMembersThat <TRuleTypeShouldConjunction, TRuleType>(_ruleCreator));
        }