This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
+219
View File
@@ -0,0 +1,219 @@
using System;
using System.Collections;
using System.Security.Permissions;
using System.Security.Policy;
namespace System.Security
{
/// <summary>Represents a collection that can contain many different types of permissions.</summary>
// Token: 0x020005C7 RID: 1479
[Serializable]
public class PermissionSet
{
// Token: 0x060035E5 RID: 13797 RVA: 0x000B87BC File Offset: 0x000B69BC
public PermissionSet()
{
}
// Token: 0x060035E6 RID: 13798 RVA: 0x000B87C4 File Offset: 0x000B69C4
internal PermissionSet(string xml)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.PermissionSet" /> class with the specified <see cref="T:System.Security.Permissions.PermissionState" />.</summary>
/// <param name="state">One of the <see cref="T:System.Security.Permissions.PermissionState" /> values. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="state" /> parameter is not a valid <see cref="T:System.Security.Permissions.PermissionState" />. </exception>
// Token: 0x060035E7 RID: 13799 RVA: 0x000B87CC File Offset: 0x000B69CC
public PermissionSet(PermissionState state)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.PermissionSet" /> class with initial values taken from the <paramref name="permSet" /> parameter.</summary>
/// <param name="permSet">The <see cref="T:System.Security.PermissionSet" /> from which to take the value of the new <see cref="T:System.Security.PermissionSet" />, or null to create an empty <see cref="T:System.Security.PermissionSet" />. </param>
// Token: 0x060035E8 RID: 13800 RVA: 0x000B87D4 File Offset: 0x000B69D4
public PermissionSet(PermissionSet permSet)
{
}
/// <summary>Adds a specified permission to the <see cref="T:System.Security.PermissionSet" />.</summary>
/// <returns>The union of the permission added and any permission of the same type that already exists in the <see cref="T:System.Security.PermissionSet" />.</returns>
/// <param name="perm">The permission to add. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035E9 RID: 13801 RVA: 0x000B87DC File Offset: 0x000B69DC
public IPermission AddPermission(IPermission perm)
{
return perm;
}
/// <summary>Declares that the calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. Using <see cref="M:System.Security.PermissionSet.Assert" /> can create security vulnerabilities.</summary>
/// <exception cref="T:System.Security.SecurityException">The <see cref="T:System.Security.PermissionSet" /> instance asserted has not been granted to the asserting code.-or- There is already an active <see cref="M:System.Security.PermissionSet.Assert" /> for the current frame. </exception>
// Token: 0x060035EA RID: 13802 RVA: 0x000B87E0 File Offset: 0x000B69E0
public virtual void Assert()
{
}
/// <summary>Creates a copy of the <see cref="T:System.Security.PermissionSet" />.</summary>
/// <returns>A copy of the <see cref="T:System.Security.PermissionSet" />.</returns>
// Token: 0x060035EB RID: 13803 RVA: 0x000B87E4 File Offset: 0x000B69E4
public virtual PermissionSet Copy()
{
return new PermissionSet(this);
}
/// <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 permissions specified by the current instance.</summary>
/// <exception cref="T:System.Security.SecurityException">A caller in the call chain does not have the permission demanded. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlPolicy" />
/// </PermissionSet>
// Token: 0x060035EC RID: 13804 RVA: 0x000B87EC File Offset: 0x000B69EC
public virtual void Demand()
{
}
/// <summary>Causes any <see cref="M:System.Security.PermissionSet.Demand" /> that passes through the calling code for any <see cref="T:System.Security.PermissionSet" /> that is not a subset of the current <see cref="T:System.Security.PermissionSet" /> to fail.</summary>
// Token: 0x060035ED RID: 13805 RVA: 0x000B87F0 File Offset: 0x000B69F0
public virtual void PermitOnly()
{
}
/// <summary>Gets a permission object of the specified type, if it exists in the set.</summary>
/// <returns>A copy of the permission object of the type specified by the <paramref name="permClass" /> parameter contained in the <see cref="T:System.Security.PermissionSet" />, or null if none exists.</returns>
/// <param name="permClass">The <see cref="T:System.Type" /> of the desired permission object. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035EE RID: 13806 RVA: 0x000B87F4 File Offset: 0x000B69F4
public virtual IPermission GetPermission(Type permClass)
{
return null;
}
/// <summary>Creates and returns a permission set that is the intersection of the current <see cref="T:System.Security.PermissionSet" /> and the specified <see cref="T:System.Security.PermissionSet" />.</summary>
/// <returns>A new <see cref="T:System.Security.PermissionSet" /> that represents the intersection of the current <see cref="T:System.Security.PermissionSet" /> and the specified target. This object is null if the intersection is empty.</returns>
/// <param name="other">A <see cref="T:System.Security.PermissionSet" /> to intersect with the current <see cref="T:System.Security.PermissionSet" />. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035EF RID: 13807 RVA: 0x000B87F8 File Offset: 0x000B69F8
public virtual PermissionSet Intersect(PermissionSet other)
{
return other;
}
/// <summary>Causes any <see cref="M:System.Security.PermissionSet.Demand" /> that passes through the calling code for a permission that has an intersection with a permission of a type contained in the current <see cref="T:System.Security.PermissionSet" /> to fail.</summary>
/// <exception cref="T:System.Security.SecurityException">A previous call to <see cref="M:System.Security.PermissionSet.Deny" /> has already restricted the permissions for the current stack frame. </exception>
// Token: 0x060035F0 RID: 13808 RVA: 0x000B87FC File Offset: 0x000B69FC
public virtual void Deny()
{
}
/// <summary>Reconstructs a security object with a specified state from an XML encoding.</summary>
/// <param name="et">The XML encoding to use to reconstruct the security object. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="et" /> parameter is null. </exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="et" /> parameter is not a valid permission element.-or- The <paramref name="et" /> parameter's version number is not supported. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035F1 RID: 13809 RVA: 0x000B8800 File Offset: 0x000B6A00
public virtual void FromXml(SecurityElement et)
{
}
/// <summary>Copies the permission objects of the set to the indicated location in an <see cref="T:System.Array" />.</summary>
/// <param name="array">The target array to which to copy. </param>
/// <param name="index">The starting position in the array to begin copying (zero based). </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="array" /> parameter is null. </exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="array" /> parameter has more than one dimension. </exception>
/// <exception cref="T:System.IndexOutOfRangeException">The <paramref name="index" /> parameter is out of the range of the <paramref name="array" /> parameter. </exception>
// Token: 0x060035F2 RID: 13810 RVA: 0x000B8804 File Offset: 0x000B6A04
public virtual void CopyTo(Array array, int index)
{
}
/// <summary>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>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035F3 RID: 13811 RVA: 0x000B8808 File Offset: 0x000B6A08
public virtual SecurityElement ToXml()
{
return null;
}
/// <summary>Determines whether the current <see cref="T:System.Security.PermissionSet" /> is a subset of the specified <see cref="T:System.Security.PermissionSet" />.</summary>
/// <returns>true if the current <see cref="T:System.Security.PermissionSet" /> is a subset of the <paramref name="target" /> parameter; otherwise, false.</returns>
/// <param name="target">A <see cref="T:System.Security.PermissionSet" /> to test for the subset relationship. This must be either a <see cref="T:System.Security.PermissionSet" /> or a <see cref="T:System.Security.NamedPermissionSet" />. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035F4 RID: 13812 RVA: 0x000B880C File Offset: 0x000B6A0C
public virtual bool IsSubsetOf(PermissionSet target)
{
return true;
}
// Token: 0x060035F5 RID: 13813 RVA: 0x000B8810 File Offset: 0x000B6A10
internal void SetReadOnly(bool value)
{
}
/// <summary>Determines whether the <see cref="T:System.Security.PermissionSet" /> is Unrestricted.</summary>
/// <returns>true if the <see cref="T:System.Security.PermissionSet" /> is Unrestricted; otherwise, false.</returns>
// Token: 0x060035F6 RID: 13814 RVA: 0x000B8814 File Offset: 0x000B6A14
public bool IsUnrestricted()
{
return true;
}
/// <summary>Creates a <see cref="T:System.Security.PermissionSet" /> that is the union of the current <see cref="T:System.Security.PermissionSet" /> and the specified <see cref="T:System.Security.PermissionSet" />.</summary>
/// <returns>A new <see cref="T:System.Security.PermissionSet" /> that represents the union of the current <see cref="T:System.Security.PermissionSet" /> and the specified <see cref="T:System.Security.PermissionSet" />.</returns>
/// <param name="other">A <see cref="T:System.Security.PermissionSet" /> to form the union with the current <see cref="T:System.Security.PermissionSet" />. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035F7 RID: 13815 RVA: 0x000B8818 File Offset: 0x000B6A18
public PermissionSet Union(PermissionSet other)
{
return new PermissionSet();
}
/// <summary>Returns an enumerator for the permissions of the set.</summary>
/// <returns>An enumerator object for the permissions of the set.</returns>
// Token: 0x060035F8 RID: 13816 RVA: 0x000B8820 File Offset: 0x000B6A20
public virtual IEnumerator GetEnumerator()
{
yield break;
}
// Token: 0x17000A8D RID: 2701
// (get) Token: 0x060035F9 RID: 13817 RVA: 0x000B8834 File Offset: 0x000B6A34
// (set) Token: 0x060035FA RID: 13818 RVA: 0x000B883C File Offset: 0x000B6A3C
internal PolicyLevel Resolver { get; set; }
// Token: 0x17000A8E RID: 2702
// (get) Token: 0x060035FB RID: 13819 RVA: 0x000B8848 File Offset: 0x000B6A48
// (set) Token: 0x060035FC RID: 13820 RVA: 0x000B8850 File Offset: 0x000B6A50
internal bool DeclarativeSecurity { get; set; }
/// <summary>Gets a value indicating whether the <see cref="T:System.Security.PermissionSet" /> is empty.</summary>
/// <returns>true if the <see cref="T:System.Security.PermissionSet" /> is empty; otherwise, false.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060035FD RID: 13821 RVA: 0x000B885C File Offset: 0x000B6A5C
public virtual bool IsEmpty()
{
return true;
}
// Token: 0x060035FE RID: 13822 RVA: 0x000B8860 File Offset: 0x000B6A60
internal static PermissionSet CreateFromBinaryFormat(byte[] data)
{
return new PermissionSet();
}
}
}