Example #1
0
 public SourceCodeValidator(IParser parser, string[] searchPatterns, ISyntaxNodeKindProvider nodeKindProvider, bool enableAllRules)
 {
     _parser = parser;
     _searchPatterns = searchPatterns;
     _treeValidator = new TreeValidator(nodeKindProvider);
     m_failures = new List<Failure>();
     if (!enableAllRules)
     {
         _treeValidator.UnregisterAllRules();
     }
 }
Example #2
0
 public SourceCodeValidator(IParser parser, string[] searchPatterns, ISyntaxNodeKindProvider nodeKindProvider, bool enableAllRules)
 {
     m_parser         = parser;
     m_searchPatterns = searchPatterns;
     m_treeValidator  = new TreeValidator(nodeKindProvider);
     m_failures       = new List <Failure>();
     if (!enableAllRules)
     {
         m_treeValidator.UnregisterAllRules();
     }
 }