54 lines
2.8 KiB
C#
54 lines
2.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>The exception that is thrown when there is an invalid attempt to access a method, such as accessing a private method from partially trusted code.</summary>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x02000684 RID: 1668
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public class MethodAccessException : MemberAccessException
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.MethodAccessException" /> class, setting the <see cref="P:System.Exception.Message" /> property of the new instance to a system-supplied message that describes the error, such as "Attempt to access the method failed." This message takes into account the current system culture.</summary>
|
|
// Token: 0x06003F48 RID: 16200 RVA: 0x000D5CB0 File Offset: 0x000D3EB0
|
|
public MethodAccessException()
|
|
: base(Locale.GetText("Attempt to access a private/protected method failed."))
|
|
{
|
|
base.HResult = -2146233072;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.MethodAccessException" /> class with a specified error message.</summary>
|
|
/// <param name="message">A <see cref="T:System.String" /> that describes the error. </param>
|
|
// Token: 0x06003F49 RID: 16201 RVA: 0x000D5CD0 File Offset: 0x000D3ED0
|
|
public MethodAccessException(string message)
|
|
: base(message)
|
|
{
|
|
base.HResult = -2146233072;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.MethodAccessException" /> class with serialized data.</summary>
|
|
/// <param name="info">The object that holds the serialized object data. </param>
|
|
/// <param name="context">The contextual information about the source or destination. </param>
|
|
// Token: 0x06003F4A RID: 16202 RVA: 0x000D5CE4 File Offset: 0x000D3EE4
|
|
protected MethodAccessException(SerializationInfo info, StreamingContext context)
|
|
: base(info, context)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.MethodAccessException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</summary>
|
|
/// <param name="message">The error message that explains the reason for the exception. </param>
|
|
/// <param name="inner">The exception that is the cause of the current exception. If the <paramref name="inner" /> parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. </param>
|
|
// Token: 0x06003F4B RID: 16203 RVA: 0x000D5CF0 File Offset: 0x000D3EF0
|
|
public MethodAccessException(string message, Exception inner)
|
|
: base(message, inner)
|
|
{
|
|
base.HResult = -2146233072;
|
|
}
|
|
|
|
// Token: 0x0400192D RID: 6445
|
|
private const int Result = -2146233072;
|
|
}
|
|
}
|