コード例 #1
0
 public CLIDexterPluginManager(IDexterPluginInitializer initializer, IDexterClient client,
                               ILog cliLog, IDexterCLIOption cliOption)
     : base(initializer, client)
 {
     this.cliLog    = cliLog;
     this.cliOption = cliOption;
 }
コード例 #2
0
        public IDexterClient CreateDexterClient(IDexterCLIOption cliOption)
        {
            IHttpClient httpWrapper = new DexterHttpClientWrapper(
                new DexterServerConfig(cliOption.ServerHostIp, cliOption.ServerPort, cliOption.UserId, cliOption.UserPassword));

            return(new DexterClient(httpWrapper));
        }
コード例 #3
0
        private AnalysisConfig CreateBaseAnalysisConfig(IDexterCLIOption cliOption, IDexterConfigFile configFile)
        {
            InitDexterConfig(cliOption, configFile);
            AnalysisConfig baseAnalysisConfig = configFile.ToAnalysisConfig();

            return(baseAnalysisConfig);
        }
コード例 #4
0
        private IDexterConfigFile CreateDexterConfigFile(IDexterCLIOption cliOption)
        {
            IDexterConfigFile configFile = new DexterConfigFile();

            configFile.LoadFromFile(File.ReadAllText(cliOption.ConfigFilePath, Encoding.UTF8));

            return(configFile);
        }
コード例 #5
0
        private static IDexterPluginManager LoadDexterPlugin(IDexterClient client, IDexterCLIOption cliOption)
        {
            IDexterPluginInitializer initializer   = new CLIPluginInitializer(CliLog);
            IDexterPluginManager     pluginManager = new CLIDexterPluginManager(initializer, client, CliLog, cliOption);

            pluginManager.InitDexterPlugins();

            return(pluginManager);
        }
コード例 #6
0
        private void Analyze(IDexterCLIOption cliOption, IDexterConfigFile configFile, IDexterClient client)
        {
            CliLog.Info(DexterLogConstant.GetStartingAnalysisMessage());

            AnalysisConfig         baseAnalysisConfig       = CreateBaseAnalysisConfig(cliOption, configFile);
            IAnalysisResultHandler cliAnalysisResultHandler = CreateCLIAnalysisResultHandler(client, cliOption);
            IDexterPluginManager   pluginManager            = LoadDexterPlugin(client, cliOption);

            InitSourceFileFullPathList(configFile, cliOption);
            AnalyzeSynchronously(pluginManager, cliAnalysisResultHandler, baseAnalysisConfig, client);
        }
コード例 #7
0
 private void InitSourceFileFullPathList(IDexterConfigFile configFile, IDexterCLIOption cliOption)
 {
     if (cliOption.IsTargetFileOptionEnabled)
     {
         this.sourceFileFullPathList = cliOption.TargetFileFullPathList;
     }
     else
     {
         this.sourceFileFullPathList = configFile.GenerateSourceFileFullPathList();
     }
 }
コード例 #8
0
 public CLIAnalysisResultHandler(string dexterWebUrl, IDexterCLIOption cliOption, ILog cliLog)
 {
     this.dexterWebUrl = dexterWebUrl;
     this.cliOption    = cliOption;
     this.cliLog       = cliLog;
 }
コード例 #9
0
 private void InitDexterConfig(IDexterCLIOption cliOption, IDexterConfigFile configFile)
 {
     config.IsSpecifiedCheckerOptionEnabledByCli = cliOption.IsSpisSpecifiedCheckerEnabledMode;
     config.DexterHome = configFile.DexterHome;
     config.CreateInitialFolderAndFiles();
 }
コード例 #10
0
 private IAnalysisResultHandler CreateCLIAnalysisResultHandler(IDexterClient client, IDexterCLIOption cliOption)
 {
     return(new CLIAnalysisResultHandler(client.DexterWebUrl, cliOption, CliLog));
 }