56 lines
3.0 KiB
C#
56 lines
3.0 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>The exception thrown when using invalid arguments that are enumerators.</summary>
|
|
// Token: 0x0200009A RID: 154
|
|
[Serializable]
|
|
public class InvalidEnumArgumentException : ArgumentException
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.InvalidEnumArgumentException" /> class without a message.</summary>
|
|
// Token: 0x0600051D RID: 1309 RVA: 0x0000DB18 File Offset: 0x0000BD18
|
|
public InvalidEnumArgumentException()
|
|
: this(null)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.InvalidEnumArgumentException" /> class with the specified message.</summary>
|
|
/// <param name="message">The message to display with this exception. </param>
|
|
// Token: 0x0600051E RID: 1310 RVA: 0x0000DB24 File Offset: 0x0000BD24
|
|
public InvalidEnumArgumentException(string message)
|
|
: base(message)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.InvalidEnumArgumentException" /> class with a message generated from the argument, the invalid value, and an enumeration class.</summary>
|
|
/// <param name="argumentName">The name of the argument that caused the exception. </param>
|
|
/// <param name="invalidValue">The value of the argument that failed. </param>
|
|
/// <param name="enumClass">A <see cref="T:System.Type" /> that represents the enumeration class with the valid values. </param>
|
|
// Token: 0x0600051F RID: 1311 RVA: 0x0000DB30 File Offset: 0x0000BD30
|
|
public InvalidEnumArgumentException(string argumentName, int invalidValue, Type enumClass)
|
|
: base(string.Format(CultureInfo.CurrentCulture, "The value of argument '{0}' ({1}) is invalid for Enum type '{2}'.", new object[] { argumentName, invalidValue, enumClass.Name }), argumentName)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.InvalidEnumArgumentException" /> class with the specified detailed description and the specified exception. </summary>
|
|
/// <param name="message">A detailed description of the error.</param>
|
|
/// <param name="innerException">A reference to the inner exception that is the cause of this exception.</param>
|
|
// Token: 0x06000520 RID: 1312 RVA: 0x0000DB70 File Offset: 0x0000BD70
|
|
public InvalidEnumArgumentException(string message, Exception innerException)
|
|
: base(message, innerException)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.InvalidEnumArgumentException" /> class using the specified serialization data and context.</summary>
|
|
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to be used for deserialization.</param>
|
|
/// <param name="context">The destination to be used for deserialization.</param>
|
|
// Token: 0x06000521 RID: 1313 RVA: 0x0000DB7C File Offset: 0x0000BD7C
|
|
protected InvalidEnumArgumentException(SerializationInfo info, StreamingContext context)
|
|
: base(info, context)
|
|
{
|
|
}
|
|
}
|
|
}
|