예제 #1
0
 public DatabaseResolver(IAssignmentGraphWalker assignmentGraphWalker,
                         IAnalysisLogger analysisLogger,
                         List <IDatabaseAccessDetector> databaseAccessDetectors,
                         IDatabaseFinder databaseFinder)
 {
     _assignmentGraphWalker   = assignmentGraphWalker;
     _analysisLogger          = analysisLogger;
     _databaseAccessDetectors = databaseAccessDetectors;
     _databaseFinder          = databaseFinder;
 }
예제 #2
0
        public GraphodeCodeAnalyzer(List <IDatabaseAccessDetector> dbAccessDetectors,
                                    IDatabaseFinder databaseFinder,
                                    IAnalysisEngine analysisEngine = null,
                                    ILogOutput logOutput           = null)
        {
            if (analysisEngine == null)
            {
                _analysisEngine = CodeFactory.BuildAnalysisEngine(dbAccessDetectors, databaseFinder);
            }
            else
            {
                _analysisEngine = analysisEngine;
            }

            if (logOutput == null)
            {
                _logOutput = CodeFactory.BuildLogOutput();
            }
            else
            {
                _logOutput = logOutput;
            }
        }
 public TicketRepository(IDatabaseFinder databaseFinder)
 {
     SetConnection(databaseFinder.GetDbSettings());
 }
 public ProductRepository(IDatabaseFinder dbFinder)
 {
     SetConnection(dbFinder.GetDbSettings());
 }
예제 #5
0
 public WorkPeriodRepository(IDatabaseFinder databaseFinder) => SetConnection(databaseFinder.GetDbSettings());
예제 #6
0
        public static IAnalysisEngine BuildAnalysisEngine(List <IDatabaseAccessDetector> dbAccessDetectors, IDatabaseFinder databaseFinder)
        {
            var logOutput = new LogOutput();

            // single instance services
            var typeService           = new TypeService();
            var tripleStore           = new TripleStore(typeService);
            var assignmentGraphWalker = new AssignmentGraphWalker(tripleStore);
            var delegateIndexer       = new DelegateIndexer(assignmentGraphWalker);
            var methodIndexer         = new MethodIndexer(delegateIndexer);

            var databaseResolver = new DatabaseResolver(assignmentGraphWalker, new AnalysisLogger(), dbAccessDetectors, databaseFinder);

            return(new AnalysisEngine(
                       new AssignmentGraphIndexer(new InstructionParser(logOutput), tripleStore, logOutput),
                       assignmentGraphWalker, methodIndexer, delegateIndexer,
                       new CallTreeWalker(methodIndexer, databaseResolver, logOutput),
                       typeService, logOutput));
        }