public HasPropertyValueRule(
     string propertyName,
     Pattern expectedPropertyValuePattern,
     IProjectScopedRuleViolationFactory violationFactory,
     RuleDescription description)
 {
     _violationFactory             = violationFactory;
     _propertyName                 = propertyName;
     _expectedPropertyValuePattern = expectedPropertyValuePattern;
     _ruleDescription              = description;
 }
Beispiel #2
0
 public SourceCodeFile(
     IProjectScopedRuleViolationFactory ruleViolationFactory,
     IReadOnlyList <string> declaredNamespaces,
     string parentProjectAssemblyName,
     string parentProjectRootNamespace,
     RelativeFilePath pathRelativeToProjectRoot,
     ICSharpClass[] classes)
 {
     _ruleViolationFactory       = ruleViolationFactory;
     _declaredNamespaces         = declaredNamespaces;
     _parentProjectAssemblyName  = parentProjectAssemblyName;
     _parentProjectRootNamespace = parentProjectRootNamespace;
     _pathRelativeToProjectRoot  = pathRelativeToProjectRoot;
     _classes = classes;
 }
Beispiel #3
0
 public CSharpMethod(MethodDeclarationInfo methodDeclarationInfo,
                     IProjectScopedRuleViolationFactory violationFactory)
 {
     _methodDeclarationInfo = methodDeclarationInfo;
     _violationFactory      = violationFactory;
 }
Beispiel #4
0
 public ProjectScopedRuleFactory(IProjectScopedRuleViolationFactory ruleViolationFactory)
 {
     _ruleViolationFactory = ruleViolationFactory;
 }
 private static ICSharpMethod[] ToMethods(List <MethodDeclarationInfo> methodDeclarationInfos,
                                          IProjectScopedRuleViolationFactory violationFactory)
 {
     return(methodDeclarationInfos.Select(m => new CSharpMethod(m, violationFactory)).ToArray <ICSharpMethod>());
 }