/// <summary>
 /// Validates the this item after it has been loaded.
 /// </summary>
 /// <param name="validationLog">The validation log.</param>
 public override void Validate(IValidationLog validationLog)
 {
     base.Validate(validationLog);
     ValidationHelpers.CheckForDuplicateItems(this.Children, validationLog, "child");
     foreach (var child in this.Children)
     {
         child.Validate(validationLog);
     }
 }
        /// <summary>
        /// Validates this server after it has been loaded.
        /// </summary>
        /// <param name="validationLog">The validation log.</param>
        public virtual void Validate(IValidationLog validationLog)
        {
            logger.Debug("Validating server '{0}'", this.Name ?? string.Empty);

            // Everything must have a name
            if (string.IsNullOrEmpty(this.Name))
            {
                validationLog.AddError("The Server has no name specified.");
            }

            // Validate the children
            foreach (var child in this.Children)
            {
                child.Validate(validationLog);
            }

            // Check if there are any duplicated children
            ValidationHelpers.CheckForDuplicateItems(this.Children, validationLog, "child");
            var projects = this.Children
                           .SelectMany(c => c.ListProjects());

            ValidationHelpers.CheckForDuplicateItems(projects, validationLog, "project");
        }