113 lines
5.4 KiB
C#
113 lines
5.4 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: 0x020003BE RID: 958
|
|
[Token(Token = "0x20003BE")]
|
|
[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: 0x06002251 RID: 8785 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002251")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
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: 0x06002252 RID: 8786 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002252")]
|
|
[Address(RVA = "0xBFF3A0", Offset = "0xBFE3A0", VA = "0x180BFF3A0", 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: 0x06002253 RID: 8787 RVA: 0x000164B8 File Offset: 0x000146B8
|
|
[Token(Token = "0x6002253")]
|
|
[Address(RVA = "0xBFF560", Offset = "0xBFE560", VA = "0x180BFF560", 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: 0x06002254 RID: 8788 RVA: 0x000164D0 File Offset: 0x000146D0
|
|
[Token(Token = "0x6002254")]
|
|
[Address(RVA = "0x4F9150", Offset = "0x4F8150", VA = "0x1804F9150", 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: 0x06002255 RID: 8789
|
|
[Token(Token = "0x6002255")]
|
|
[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: 0x06002256 RID: 8790 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002256")]
|
|
[Address(RVA = "0xBFF730", Offset = "0xBFE730", VA = "0x180BFF730", 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: 0x06002257 RID: 8791
|
|
[Token(Token = "0x6002257")]
|
|
[Address(Slot = "7")]
|
|
public abstract SecurityElement ToXml();
|
|
|
|
// Token: 0x06002258 RID: 8792 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002258")]
|
|
[Address(RVA = "0xBFF420", Offset = "0xBFE420", VA = "0x180BFF420")]
|
|
internal SecurityElement Element(int version)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06002259 RID: 8793 RVA: 0x000164E8 File Offset: 0x000146E8
|
|
[Token(Token = "0x6002259")]
|
|
[Address(RVA = "0xBFF2F0", Offset = "0xBFE2F0", VA = "0x180BFF2F0")]
|
|
internal static PermissionState CheckPermissionState(PermissionState state, bool allowUnrestricted)
|
|
{
|
|
return PermissionState.None;
|
|
}
|
|
|
|
// Token: 0x0600225A RID: 8794 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600225A")]
|
|
[Address(RVA = "0xBFF690", Offset = "0xBFE690", VA = "0x180BFF690")]
|
|
internal static void ThrowInvalidPermission(IPermission target, Type expected)
|
|
{
|
|
}
|
|
}
|
|
}
|