public void DisplayErrorLog(IErrorLogService errorLogService)
 {
     errorLogService.ForEachConfigurationErrors(new Action <ConfigurationError>(DisplayConfigurationError));
     configurationErrorsCount = errorLogService.ConfigurationErrorCount;
     errorLogService.ForEachValidationErrors(new Action <ValidationError>(DisplayValidationError));
     validationErrorsCount = errorLogService.ValidationErrorCount;
 }
Esempio n. 2
0
        public void DisplayErrorLog(IErrorLogService errorLogService)
        {			
			errorLogService.ForEachConfigurationErrors(new Action<ConfigurationError>(DisplayConfigurationError));
			configurationErrorsCount = errorLogService.ConfigurationErrorCount;
			errorLogService.ForEachValidationErrors(new Action<ValidationError>(DisplayValidationError));
            validationErrorsCount = errorLogService.ValidationErrorCount;			                        
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private List <Task> GetTasksFromErrorService(IErrorLogService errorService)
        {
            List <Task> configuationTasks = new List <Task>();

            errorService.ForEachConfigurationErrors(delegate(ConfigurationError configurationError)
            {
                configuationTasks.Add(new ConfigurationNodeTask(configurationError.ConfigurationNode, configurationError.Message));
            });

            errorService.ForEachValidationErrors(delegate(ValidationError validationError)
            {
                configuationTasks.Add(new ConfigurationNodeTask(validationError.InvalidItem, validationError.Message));
            });

            return(configuationTasks);
        }
Esempio n. 4
0
        public void DisplayErrorLog(IErrorLogService errorLogService)
        {
            bool containsErrors = false;

            errorLogService.ForEachConfigurationErrors(delegate(ConfigurationError error)
            {
                string configurationErrorLine = string.Format(Resources.ConfigurationErrorFmt, error.Message);
                System.Console.WriteLine(configurationErrorLine);
                containsErrors = true;
            });

            errorLogService.ForEachValidationErrors(delegate(ValidationError validationError)
            {
                string configurationErrorLine = string.Format(Resources.ConfigurationErrorFmt, validationError.InvalidItem.Path, validationError.PropertyName, validationError.Message);
                System.Console.WriteLine(configurationErrorLine);
                containsErrors = true;
            });

            if (containsErrors)
            {
                Environment.Exit(1);
            }
        }
Esempio n. 5
0
 public void DisplayErrorLog(IErrorLogService errorLogService)
 {
     ResetErrorList();
     errorLogService.ForEachValidationErrors(new Action<ValidationError>(DisplayValidationError));
     errorLogService.ForEachConfigurationErrors(new Action<ConfigurationError>(DisplayConfigurationError));
 }