90 lines
3.4 KiB
C#
90 lines
3.4 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Security.Permissions
|
|
{
|
|
/// <summary>Allows security actions for <see cref="T:System.Security.Permissions.EnvironmentPermission" /> to be applied to code using declarative security. This class cannot be inherited.</summary>
|
|
// Token: 0x02000540 RID: 1344
|
|
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public sealed class EnvironmentPermissionAttribute : CodeAccessSecurityAttribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAttribute" /> class with the specified <see cref="T:System.Security.Permissions.SecurityAction" />.</summary>
|
|
/// <param name="action">One of the <see cref="T:System.Security.Permissions.SecurityAction" /> values. </param>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="action" /> parameter is not a valid value of <see cref="T:System.Security.Permissions.SecurityAction" />. </exception>
|
|
// Token: 0x06003129 RID: 12585 RVA: 0x000A94F0 File Offset: 0x000A76F0
|
|
public EnvironmentPermissionAttribute(SecurityAction action)
|
|
: base(action)
|
|
{
|
|
}
|
|
|
|
/// <summary>Sets full access for the environment variables specified by the string value.</summary>
|
|
/// <returns>A list of environment variables for full access.</returns>
|
|
/// <exception cref="T:System.NotSupportedException">The get method is not supported for this property.</exception>
|
|
// Token: 0x1700099D RID: 2461
|
|
// (get) Token: 0x0600312A RID: 12586 RVA: 0x000A94FC File Offset: 0x000A76FC
|
|
// (set) Token: 0x0600312B RID: 12587 RVA: 0x000A9508 File Offset: 0x000A7708
|
|
public string All
|
|
{
|
|
get
|
|
{
|
|
throw new NotSupportedException("All");
|
|
}
|
|
set
|
|
{
|
|
this.read = value;
|
|
this.write = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets read access for the environment variables specified by the string value.</summary>
|
|
/// <returns>A list of environment variables for read access.</returns>
|
|
// Token: 0x1700099E RID: 2462
|
|
// (get) Token: 0x0600312C RID: 12588 RVA: 0x000A9518 File Offset: 0x000A7718
|
|
// (set) Token: 0x0600312D RID: 12589 RVA: 0x000A9520 File Offset: 0x000A7720
|
|
public string Read
|
|
{
|
|
get
|
|
{
|
|
return this.read;
|
|
}
|
|
set
|
|
{
|
|
this.read = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets write access for the environment variables specified by the string value.</summary>
|
|
/// <returns>A list of environment variables for write access.</returns>
|
|
// Token: 0x1700099F RID: 2463
|
|
// (get) Token: 0x0600312E RID: 12590 RVA: 0x000A952C File Offset: 0x000A772C
|
|
// (set) Token: 0x0600312F RID: 12591 RVA: 0x000A9534 File Offset: 0x000A7734
|
|
public string Write
|
|
{
|
|
get
|
|
{
|
|
return this.write;
|
|
}
|
|
set
|
|
{
|
|
this.write = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Creates and returns a new <see cref="T:System.Security.Permissions.EnvironmentPermission" />.</summary>
|
|
/// <returns>An <see cref="T:System.Security.Permissions.EnvironmentPermission" /> that corresponds to this attribute.</returns>
|
|
// Token: 0x06003130 RID: 12592 RVA: 0x000A9540 File Offset: 0x000A7740
|
|
public override IPermission CreatePermission()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x04001415 RID: 5141
|
|
private string read;
|
|
|
|
// Token: 0x04001416 RID: 5142
|
|
private string write;
|
|
}
|
|
}
|