Ejemplo n.º 1
0
        public void SetRunnersExecutionLoggerConfigs()
        {
            _selectedExecutionLoggerConfiguration = WorkSpace.Instance.Solution.ExecutionLoggerConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault();

            if (_selectedExecutionLoggerConfiguration.ExecutionLoggerConfigurationIsEnabled)
            {
                DateTime currentExecutionDateTime = DateTime.Now;

                ExecutionLogger.RunSetStart(_selectedExecutionLoggerConfiguration.ExecutionLoggerConfigurationExecResultsFolder, _selectedExecutionLoggerConfiguration.ExecutionLoggerConfigurationMaximalFolderSize, currentExecutionDateTime);

                int ginger_index = 0;
                while (Runners.Count > ginger_index)
                {
                    Runners[ginger_index].ExecutionLogger.GingerData.Seq                 = ginger_index + 1;
                    Runners[ginger_index].ExecutionLogger.GingerData.GingerName          = Runners[ginger_index].Name;
                    Runners[ginger_index].ExecutionLogger.GingerData.Ginger_GUID         = Runners[ginger_index].Guid;
                    Runners[ginger_index].ExecutionLogger.GingerData.GingerAggentMapping = Runners[ginger_index].ApplicationAgents.Select(a => a.AgentName + "_:_" + a.AppName).ToList();
                    Runners[ginger_index].ExecutionLogger.GingerData.GingerEnv           = Runners[ginger_index].ProjEnvironment.Name.ToString();
                    Runners[ginger_index].ExecutionLogger.CurrentExecutionDateTime       = currentExecutionDateTime;
                    Runners[ginger_index].ExecutionLogger.Configuration = _selectedExecutionLoggerConfiguration;
                    ginger_index++;
                }
            }
        }