Files
Dec2017-Script-Dump/mscorlib/System/ArgumentOutOfRangeException.cs
2026-06-04 11:42:34 +02:00

126 lines
6.3 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System
{
/// <summary>The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000639 RID: 1593
[ComVisible(true)]
[Serializable]
public class ArgumentOutOfRangeException : ArgumentException
{
/// <summary>Initializes a new instance of the <see cref="T:System.ArgumentOutOfRangeException" /> class.</summary>
// Token: 0x06003B1B RID: 15131 RVA: 0x000C9A4C File Offset: 0x000C7C4C
public ArgumentOutOfRangeException()
: base(Locale.GetText("Argument is out of range."))
{
base.HResult = -2146233086;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ArgumentOutOfRangeException" /> class with the name of the parameter that causes this exception.</summary>
/// <param name="paramName">The name of the parameter that causes this exception. </param>
// Token: 0x06003B1C RID: 15132 RVA: 0x000C9A6C File Offset: 0x000C7C6C
public ArgumentOutOfRangeException(string paramName)
: base(Locale.GetText("Argument is out of range."), paramName)
{
base.HResult = -2146233086;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ArgumentOutOfRangeException" /> class with a specified error message and the name of the parameter that causes this exception.</summary>
/// <param name="paramName">The name of the parameter that caused the exception. </param>
/// <param name="message">The message that describes the error. </param>
// Token: 0x06003B1D RID: 15133 RVA: 0x000C9A8C File Offset: 0x000C7C8C
public ArgumentOutOfRangeException(string paramName, string message)
: base(message, paramName)
{
base.HResult = -2146233086;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ArgumentOutOfRangeException" /> class with a specified error message, the parameter name, and the value of the argument.</summary>
/// <param name="paramName">The name of the parameter that caused the exception. </param>
/// <param name="actualValue">The value of the argument that causes this exception. </param>
/// <param name="message">The message that describes the error. </param>
// Token: 0x06003B1E RID: 15134 RVA: 0x000C9AA4 File Offset: 0x000C7CA4
public ArgumentOutOfRangeException(string paramName, object actualValue, string message)
: base(message, paramName)
{
this.actual_value = actualValue;
base.HResult = -2146233086;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ArgumentOutOfRangeException" /> class with serialized data.</summary>
/// <param name="info">The object that holds the serialized object data. </param>
/// <param name="context">An object that describes the source or destination of the serialized data. </param>
// Token: 0x06003B1F RID: 15135 RVA: 0x000C9AC0 File Offset: 0x000C7CC0
protected ArgumentOutOfRangeException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
this.actual_value = info.GetString("ActualValue");
}
/// <summary>Initializes a new instance of the <see cref="T:System.ArgumentOutOfRangeException" /> class with a specified error message and the exception that is the cause of this exception.</summary>
/// <param name="message">The error message that explains the reason for this exception. </param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. </param>
// Token: 0x06003B20 RID: 15136 RVA: 0x000C9ADC File Offset: 0x000C7CDC
public ArgumentOutOfRangeException(string message, Exception innerException)
: base(message, innerException)
{
base.HResult = -2146233086;
}
/// <summary>Gets the argument value that causes this exception.</summary>
/// <returns>An Object that contains the value of the parameter that caused the current <see cref="T:System.Exception" />.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B52 RID: 2898
// (get) Token: 0x06003B21 RID: 15137 RVA: 0x000C9AF4 File Offset: 0x000C7CF4
public virtual object ActualValue
{
get
{
return this.actual_value;
}
}
/// <summary>Gets the error message and the string representation of the invalid argument value, or only the error message if the argument value is null.</summary>
/// <returns>The text message for this exception. The value of this property takes one of two forms, as follows.Condition Value The <paramref name="actualValue" /> is null. The <paramref name="message" /> string passed to the constructor. The <paramref name="actualValue" /> is not null. The <paramref name="message" /> string appended with the string representation of the invalid argument value. </returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000B53 RID: 2899
// (get) Token: 0x06003B22 RID: 15138 RVA: 0x000C9AFC File Offset: 0x000C7CFC
public override string Message
{
get
{
string message = base.Message;
if (this.actual_value == null)
{
return message;
}
return message + Environment.NewLine + this.actual_value;
}
}
/// <summary>Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with the invalid argument value and additional exception information.</summary>
/// <param name="info">The object that holds the serialized object data. </param>
/// <param name="context">An object that describes the source or destination of the serialized data. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> object is null. </exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06003B23 RID: 15139 RVA: 0x000C9B30 File Offset: 0x000C7D30
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("ActualValue", this.actual_value);
}
// Token: 0x040017A4 RID: 6052
private const int Result = -2146233086;
// Token: 0x040017A5 RID: 6053
private object actual_value;
}
}