File: _generated\1\Validation.cs
Web Access
Project: src\winforms\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.ComponentModel.Design.DisplayMode enumToValidate, string parameterName = "value")
        {
            int intValue = (int)enumToValidate;
            if (intValue >= 1 && intValue <= 4) return;
            ReportEnumValidationError(parameterName, intValue, typeof(System.ComponentModel.Design.DisplayMode));
        }
 
 
        private static void ReportEnumValidationError(string parameterName, int value, System.Type enumType)
        {
            throw new System.ComponentModel.InvalidEnumArgumentException(parameterName, value, enumType);
        }
    }
}