113 lines
5.5 KiB
C#
113 lines
5.5 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Runtime.InteropServices;
|
|
using System.Security.Permissions;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Security
|
|
{
|
|
/// <summary>Defines the underlying structure of all code access permissions.</summary>
|
|
// Token: 0x020003A2 RID: 930
|
|
[Token(Token = "0x20003A2")]
|
|
[MonoTODO]
|
|
[ComVisible(true)]
|
|
[MonoTODO("CAS support is experimental (and unsupported).")]
|
|
[Serializable]
|
|
public abstract class CodeAccessPermission : IPermission, ISecurityEncodable
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.CodeAccessPermission" /> class.</summary>
|
|
// Token: 0x06002045 RID: 8261 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002045")]
|
|
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
|
protected CodeAccessPermission()
|
|
{
|
|
}
|
|
|
|
/// <summary>Forces a <see cref="T:System.Security.SecurityException" /> at run time if all callers higher in the call stack have not been granted the permission specified by the current instance.</summary>
|
|
/// <exception cref="T:System.Security.SecurityException">A caller higher in the call stack does not have the permission specified by the current instance.
|
|
/// -or-
|
|
/// A caller higher in the call stack has called <see cref="M:System.Security.CodeAccessPermission.Deny" /> on the current permission object.</exception>
|
|
// Token: 0x06002046 RID: 8262 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002046")]
|
|
[Address(RVA = "0x298B6A0", Offset = "0x298A4A0", VA = "0x18298B6A0", Slot = "5")]
|
|
[Conditional("MONO_FEATURE_CAS")]
|
|
public void Demand()
|
|
{
|
|
}
|
|
|
|
/// <summary>Determines whether the specified <see cref="T:System.Security.CodeAccessPermission" /> object is equal to the current <see cref="T:System.Security.CodeAccessPermission" />.</summary>
|
|
/// <param name="obj">The <see cref="T:System.Security.CodeAccessPermission" /> object to compare with the current <see cref="T:System.Security.CodeAccessPermission" />.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the specified <see cref="T:System.Security.CodeAccessPermission" /> object is equal to the current <see cref="T:System.Security.CodeAccessPermission" />; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06002047 RID: 8263 RVA: 0x000140E8 File Offset: 0x000122E8
|
|
[Token(Token = "0x6002047")]
|
|
[Address(RVA = "0x298B860", Offset = "0x298A660", VA = "0x18298B860", Slot = "0")]
|
|
[ComVisible(false)]
|
|
public override bool Equals(object obj)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Gets a hash code for the <see cref="T:System.Security.CodeAccessPermission" /> object that is suitable for use in hashing algorithms and data structures such as a hash table.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.Security.CodeAccessPermission" /> object.</returns>
|
|
// Token: 0x06002048 RID: 8264 RVA: 0x00014100 File Offset: 0x00012300
|
|
[Token(Token = "0x6002048")]
|
|
[Address(RVA = "0x19424F0", Offset = "0x19412F0", VA = "0x1819424F0", Slot = "2")]
|
|
[ComVisible(false)]
|
|
public override int GetHashCode()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>When implemented by a derived class, determines whether the current permission is a subset of the specified permission.</summary>
|
|
/// <param name="target">A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the current permission is a subset of the specified permission; otherwise, <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="target" /> parameter is not <see langword="null" /> and is not of the same type as the current permission.</exception>
|
|
// Token: 0x06002049 RID: 8265
|
|
[Token(Token = "0x6002049")]
|
|
[Address(Slot = "6")]
|
|
public abstract bool IsSubsetOf(IPermission target);
|
|
|
|
/// <summary>Creates and returns a string representation of the current permission object.</summary>
|
|
/// <returns>A string representation of the current permission object.</returns>
|
|
// Token: 0x0600204A RID: 8266 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600204A")]
|
|
[Address(RVA = "0x298BA30", Offset = "0x298A830", VA = "0x18298BA30", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>When overridden in a derived class, creates an XML encoding of the security object and its current state.</summary>
|
|
/// <returns>An XML encoding of the security object, including any state information.</returns>
|
|
// Token: 0x0600204B RID: 8267
|
|
[Token(Token = "0x600204B")]
|
|
[Address(Slot = "7")]
|
|
public abstract SecurityElement ToXml();
|
|
|
|
// Token: 0x0600204C RID: 8268 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600204C")]
|
|
[Address(RVA = "0x298B720", Offset = "0x298A520", VA = "0x18298B720")]
|
|
internal SecurityElement Element(int version)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x0600204D RID: 8269 RVA: 0x00014118 File Offset: 0x00012318
|
|
[Token(Token = "0x600204D")]
|
|
[Address(RVA = "0x298B5F0", Offset = "0x298A3F0", VA = "0x18298B5F0")]
|
|
internal static PermissionState CheckPermissionState(PermissionState state, bool allowUnrestricted)
|
|
{
|
|
return PermissionState.None;
|
|
}
|
|
|
|
// Token: 0x0600204E RID: 8270 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600204E")]
|
|
[Address(RVA = "0x298B990", Offset = "0x298A790", VA = "0x18298B990")]
|
|
internal static void ThrowInvalidPermission(IPermission target, Type expected)
|
|
{
|
|
}
|
|
}
|
|
}
|