public CLIDexterPluginManager(IDexterPluginInitializer initializer, IDexterClient client, ILog cliLog, IDexterCLIOption cliOption) : base(initializer, client) { this.cliLog = cliLog; this.cliOption = cliOption; }
public IDexterClient CreateDexterClient(IDexterCLIOption cliOption) { IHttpClient httpWrapper = new DexterHttpClientWrapper( new DexterServerConfig(cliOption.ServerHostIp, cliOption.ServerPort, cliOption.UserId, cliOption.UserPassword)); return(new DexterClient(httpWrapper)); }
private AnalysisConfig CreateBaseAnalysisConfig(IDexterCLIOption cliOption, IDexterConfigFile configFile) { InitDexterConfig(cliOption, configFile); AnalysisConfig baseAnalysisConfig = configFile.ToAnalysisConfig(); return(baseAnalysisConfig); }
private IDexterConfigFile CreateDexterConfigFile(IDexterCLIOption cliOption) { IDexterConfigFile configFile = new DexterConfigFile(); configFile.LoadFromFile(File.ReadAllText(cliOption.ConfigFilePath, Encoding.UTF8)); return(configFile); }
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); }
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); }
private void InitSourceFileFullPathList(IDexterConfigFile configFile, IDexterCLIOption cliOption) { if (cliOption.IsTargetFileOptionEnabled) { this.sourceFileFullPathList = cliOption.TargetFileFullPathList; } else { this.sourceFileFullPathList = configFile.GenerateSourceFileFullPathList(); } }
public CLIAnalysisResultHandler(string dexterWebUrl, IDexterCLIOption cliOption, ILog cliLog) { this.dexterWebUrl = dexterWebUrl; this.cliOption = cliOption; this.cliLog = cliLog; }
private void InitDexterConfig(IDexterCLIOption cliOption, IDexterConfigFile configFile) { config.IsSpecifiedCheckerOptionEnabledByCli = cliOption.IsSpisSpecifiedCheckerEnabledMode; config.DexterHome = configFile.DexterHome; config.CreateInitialFolderAndFiles(); }
private IAnalysisResultHandler CreateCLIAnalysisResultHandler(IDexterClient client, IDexterCLIOption cliOption) { return(new CLIAnalysisResultHandler(client.DexterWebUrl, cliOption, CliLog)); }