public void LoadContent(string content, CLIHelper cliHelper, RunsetExecutor runsetExecutor) { DynamicGingerExecution dynamicExecution = DynamicExecutionManager.LoadDynamicExecutionFromXML(content); if (dynamicExecution.SolutionDetails.SourceControlDetails != null) { cliHelper.SetSourceControlType(dynamicExecution.SolutionDetails.SourceControlDetails.Type); cliHelper.SetSourceControlURL(dynamicExecution.SolutionDetails.SourceControlDetails.Url); cliHelper.SetSourceControlUser(dynamicExecution.SolutionDetails.SourceControlDetails.User); cliHelper.SetSourceControlPassword(dynamicExecution.SolutionDetails.SourceControlDetails.Password); cliHelper.PasswordEncrypted(dynamicExecution.SolutionDetails.SourceControlDetails.PasswordEncrypted); if (string.IsNullOrEmpty(dynamicExecution.SolutionDetails.SourceControlDetails.ProxyServer) == false) { cliHelper.SourceControlProxyServer(dynamicExecution.SolutionDetails.SourceControlDetails.ProxyServer); cliHelper.SourceControlProxyPort(dynamicExecution.SolutionDetails.SourceControlDetails.ProxyPort); } } cliHelper.Solution = dynamicExecution.SolutionDetails.Path; cliHelper.ShowAutoRunWindow = dynamicExecution.ShowAutoRunWindow; AddRunset addRunset = dynamicExecution.AddRunsets[0];//for now supporting only one Run set execution cliHelper.Env = addRunset.Environment; cliHelper.RunAnalyzer = addRunset.RunAnalyzer; DynamicExecutionManager.CreateRealRunSetFromDynamic(runsetExecutor, addRunset); }
public void LoadRunsetConfigurations(string content, CLIHelper cliHelper, RunsetExecutor runsetExecutor) { if (FileType == eFileType.JSON) { //Dynamic JSON GingerExecConfig exeConfiguration = DynamicExecutionManager.DeserializeDynamicExecutionFromJSON(content); RunsetExecConfig runset = exeConfiguration.Runset; if (runset.EnvironmentName != null || runset.EnvironmentID != null) { ProjEnvironment env = DynamicExecutionManager.FindItemByIDAndName <ProjEnvironment>( new Tuple <string, Guid?>(nameof(ProjEnvironment.Guid), runset.EnvironmentID), new Tuple <string, string>(nameof(ProjEnvironment.Name), runset.EnvironmentName), WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <ProjEnvironment>()); if (env != null) { cliHelper.Env = env.Name; } } if (runset.RunAnalyzer != null) { cliHelper.RunAnalyzer = (bool)runset.RunAnalyzer; } DynamicExecutionManager.CreateUpdateRunSetFromJSON(runsetExecutor, exeConfiguration); } else { //Dynamic XML DynamicGingerExecution dynamicExecution = DynamicExecutionManager.LoadDynamicExecutionFromXML(content); AddRunset addRunset = dynamicExecution.AddRunsets[0];//for now supporting only one Run set execution cliHelper.Env = addRunset.Environment; cliHelper.RunAnalyzer = addRunset.RunAnalyzer; DynamicExecutionManager.CreateRunSetFromXML(runsetExecutor, addRunset); } }