File: Validation.cs
Project: src\src\System.Windows.Forms.Design\src\System.Windows.Forms.Design.csproj (System.Windows.Forms.Design)
// <auto-generated />
namespace SourceGenerated
{
    internal static partial class EnumValidator
    {
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.HighDpiMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.HighDpiMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.AccessibleRole enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= -1 && intValue <= 64) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.AccessibleRole));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ImageLayout enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ImageLayout));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.RightToLeft enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.RightToLeft));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ImeMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= -1 && intValue <= 12) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ImeMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.AutoSizeMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.AutoSizeMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DialogResult enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 7) return;
            if (intValue >= 10 && intValue <= 11) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DialogResult));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.FlatStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.FlatStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Drawing.ContentAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 1 && intValue <= 2) return;
            if (intValue == 4) return;
            if (intValue == 16) return;
            if (intValue == 32) return;
            if (intValue == 64) return;
            if (intValue == 256) return;
            if (intValue == 512) return;
            if (intValue == 1024) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Drawing.ContentAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TextImageRelation enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            if (intValue == 4) return;
            if (intValue == 8) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TextImageRelation));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.Appearance enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.Appearance));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.CheckState enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.CheckState));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.AutoCompleteMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.AutoCompleteMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.AutoCompleteSource enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 1 && intValue <= 2) return;
            if (intValue == 4) return;
            if (intValue >= 6 && intValue <= 7) return;
            if (intValue == 32) return;
            if (intValue == 64) return;
            if (intValue == 128) return;
            if (intValue == 256) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.AutoCompleteSource));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DrawMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DrawMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ComboBoxStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ComboBoxStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.BorderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.BorderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewCellBorderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 10) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewCellBorderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewClipboardCopyMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewClipboardCopyMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewHeaderBorderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewHeaderBorderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewEditMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewEditMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ScrollBars enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ScrollBars));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewSelectionMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewSelectionMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewAdvancedCellBorderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 7) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewAdvancedCellBorderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewTriState enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewTriState));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.SortOrder enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.SortOrder));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewComboBoxDisplayStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewComboBoxDisplayStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DataGridViewImageCellLayout enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DataGridViewImageCellLayout));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.LinkBehavior enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.LinkBehavior));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.LeftRightAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.LeftRightAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DateTimePickerFormat enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 1 && intValue <= 2) return;
            if (intValue == 4) return;
            if (intValue == 8) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DateTimePickerFormat));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ColorDepth enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue == 4) return;
            if (intValue == 8) return;
            if (intValue == 16) return;
            if (intValue == 24) return;
            if (intValue == 32) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ColorDepth));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.Automation.AutomationLiveSetting enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.Automation.AutomationLiveSetting));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.SelectionMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.SelectionMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.HorizontalAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.HorizontalAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ItemActivation enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ItemActivation));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ListViewAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            if (intValue == 5) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ListViewAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ColumnHeaderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ColumnHeaderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.View enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.View));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ItemBoundsPortion enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ItemBoundsPortion));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ColumnHeaderAutoResizeStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ColumnHeaderAutoResizeStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ListViewGroupCollapsedState enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ListViewGroupCollapsedState));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.PictureBoxSizeMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.PictureBoxSizeMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ProgressBarStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ProgressBarStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.PropertySort enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if ((intValue & 3) == intValue) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.PropertySort));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.RichTextBoxScrollBars enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            if (intValue >= 17 && intValue <= 19) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.RichTextBoxScrollBars));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.RichTextBoxStreamType enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.RichTextBoxStreamType));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TabAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TabAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TabAppearance enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TabAppearance));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TabDrawMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TabDrawMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TabSizeMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TabSizeMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.MaskFormat enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.MaskFormat));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.InsertKeyMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.InsertKeyMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.CharacterCasing enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.CharacterCasing));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripGripStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripGripStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripLayoutStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripLayoutStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripRenderMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripRenderMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripTextDirection enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripTextDirection));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripItemAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripItemAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.DockStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 5) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.DockStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripItemDisplayStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripItemDisplayStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripItemImageScaling enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripItemImageScaling));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.MergeAction enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.MergeAction));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripItemOverflow enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripItemOverflow));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolStripManagerRenderMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolStripManagerRenderMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.Border3DStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 1 && intValue <= 2) return;
            if (intValue >= 4 && intValue <= 6) return;
            if (intValue >= 8 && intValue <= 10) return;
            if (intValue == 8192) return;
            if (intValue == 16394) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.Border3DStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TreeViewDrawMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TreeViewDrawMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.MessageBoxButtons enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 6) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.MessageBoxButtons));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.MessageBoxIcon enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue == 0) return;
            if (intValue == 16) return;
            if (intValue == 32) return;
            if (intValue == 48) return;
            if (intValue == 64) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.MessageBoxIcon));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.MessageBoxDefaultButton enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue == 0) return;
            if (intValue == 256) return;
            if (intValue == 512) return;
            if (intValue == 768) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.MessageBoxDefaultButton));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TaskDialogExpanderPosition enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TaskDialogExpanderPosition));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TaskDialogProgressBarState enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 5) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TaskDialogProgressBarState));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ErrorIconAlignment enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 5) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ErrorIconAlignment));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ErrorBlinkStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ErrorBlinkStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.FormBorderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 6) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.FormBorderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ScreenCaptureMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ScreenCaptureMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.SizeGripStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.SizeGripStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.FormStartPosition enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.FormStartPosition));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.FormWindowState enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.FormWindowState));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.HelpNavigator enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= -2147483647 && intValue <= -2147483641) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.HelpNavigator));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.AutoScaleMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.AutoScaleMode));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.FixedPanel enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.FixedPanel));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.Orientation enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 1) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.Orientation));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.FlowDirection enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.FlowDirection));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.ToolTipIcon enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 3) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.ToolTipIcon));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TextDataFormat enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TextDataFormat));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TableLayoutPanelCellBorderStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 6) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TableLayoutPanelCellBorderStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.TableLayoutPanelGrowStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.TableLayoutPanelGrowStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.Edges enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if ((intValue & 31) == intValue) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.Edges));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.EdgeStyle enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 5 && intValue <= 6) return;
            if (intValue >= 9 && intValue <= 10) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.EdgeStyle));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.EdgeEffects enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if ((intValue & 55296) == intValue) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.EdgeEffects));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.BooleanProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 2201 && intValue <= 2213) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.BooleanProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.ColorProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 3801 && intValue <= 3823) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.ColorProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.EnumProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 4001 && intValue <= 4015) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.EnumProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.FilenameProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 3001 && intValue <= 3008) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.FilenameProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.FontProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue == 210) return;
            if (intValue == 2601) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.FontProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.IntegerProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 2401 && intValue <= 2424) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.IntegerProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.ThemeSizeType enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 0 && intValue <= 2) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.ThemeSizeType));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.PointProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 3401 && intValue <= 3408) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.PointProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.MarginProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 3601 && intValue <= 3603) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.MarginProperty));
        }
 
        /// <summary>Validates that the enum value passed in is valid for the enum type.</summary>
        public static void Validate(System.Windows.Forms.VisualStyles.StringProperty enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue == 3201) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.VisualStyles.StringProperty));
        }
 
 
        private static void ReportEnumValidationError(string parameterName, int value, System.Type enumType)
        {
            throw new System.ComponentModel.InvalidEnumArgumentException(parameterName, value, enumType);
        }
    }
}