public ValidatorBase()
        {
            messageContainer = new ValidationMessageContainer();

            if (validationSettings == null)
            {
                validationSettings = (Hashtable)PowerShellHelper.InvokeCommand("(Get-Module -Name AutomatedLabDefinition -ListAvailable).PrivateData.ValidationSettings").FirstOrDefault().BaseObject;
            }
        }
Ejemplo n.º 2
0
        public ValidatorBase()
        {
            messageContainer = new ValidationMessageContainer();

            if (validationSettings == null)
            {
                PowerShellHelper.InvokeCommand("Import-Module -Name AutomatedLab");
                validationSettings = (Hashtable)PowerShellHelper.InvokeCommand("[hashtable](Get-LabConfigurationItem -Name ValidationSettings)").FirstOrDefault().BaseObject;
            }
        }
        public ValidationMessageContainer RunValidation()
        {
            var start = DateTime.Now;

            System.Threading.Thread.Sleep(10);

            var container = new ValidationMessageContainer();

            container.Messages      = Validate().ToList();
            container.ValidatorName = new System.Diagnostics.StackTrace().GetFrame(1).GetMethod().DeclaringType.Name;

            var end = DateTime.Now;

            container.Runtime = end - start;

            return(container);
        }
Ejemplo n.º 4
0
 public ValidatorBase()
 {
     messageContainer = new ValidationMessageContainer();
 }