using System;
using System.Runtime.InteropServices;
namespace System.Security.Permissions
{
/// Allows security actions for to be applied to code using declarative security. This class cannot be inherited.
// Token: 0x02000566 RID: 1382
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
[ComVisible(true)]
[Serializable]
public sealed class RegistryPermissionAttribute : CodeAccessSecurityAttribute
{
/// Initializes a new instance of the class with the specified .
/// One of the values.
/// The parameter is not a valid .
// Token: 0x0600327A RID: 12922 RVA: 0x000ADC5C File Offset: 0x000ABE5C
public RegistryPermissionAttribute(SecurityAction action)
: base(action)
{
}
/// Gets or sets full access for the specified registry keys.
/// A semicolon-separated list of registry key paths, for full access.
/// The get accessor is called; it is only provided for C# compiler compatibility.
// Token: 0x170009E7 RID: 2535
// (get) Token: 0x0600327B RID: 12923 RVA: 0x000ADC68 File Offset: 0x000ABE68
// (set) Token: 0x0600327C RID: 12924 RVA: 0x000ADC74 File Offset: 0x000ABE74
[Obsolete("use newer properties")]
public string All
{
get
{
throw new NotSupportedException("All");
}
set
{
this.create = value;
this.read = value;
this.write = value;
}
}
/// Gets or sets create-level access for the specified registry keys.
/// A semicolon-separated list of registry key paths, for create-level access.
// Token: 0x170009E8 RID: 2536
// (get) Token: 0x0600327D RID: 12925 RVA: 0x000ADC8C File Offset: 0x000ABE8C
// (set) Token: 0x0600327E RID: 12926 RVA: 0x000ADC94 File Offset: 0x000ABE94
public string Create
{
get
{
return this.create;
}
set
{
this.create = value;
}
}
/// Gets or sets read access for the specified registry keys.
/// A semicolon-separated list of registry key paths, for read access.
// Token: 0x170009E9 RID: 2537
// (get) Token: 0x0600327F RID: 12927 RVA: 0x000ADCA0 File Offset: 0x000ABEA0
// (set) Token: 0x06003280 RID: 12928 RVA: 0x000ADCA8 File Offset: 0x000ABEA8
public string Read
{
get
{
return this.read;
}
set
{
this.read = value;
}
}
/// Gets or sets write access for the specified registry keys.
/// A semicolon-separated list of registry key paths, for write access.
// Token: 0x170009EA RID: 2538
// (get) Token: 0x06003281 RID: 12929 RVA: 0x000ADCB4 File Offset: 0x000ABEB4
// (set) Token: 0x06003282 RID: 12930 RVA: 0x000ADCBC File Offset: 0x000ABEBC
public string Write
{
get
{
return this.write;
}
set
{
this.write = value;
}
}
/// Gets or sets change access control for the specified registry keys.
/// A semicolon-separated list of registry key paths, for change access control. .
// Token: 0x170009EB RID: 2539
// (get) Token: 0x06003283 RID: 12931 RVA: 0x000ADCC8 File Offset: 0x000ABEC8
// (set) Token: 0x06003284 RID: 12932 RVA: 0x000ADCD0 File Offset: 0x000ABED0
public string ChangeAccessControl
{
get
{
return this.changeAccessControl;
}
set
{
this.changeAccessControl = value;
}
}
/// Gets or sets view access control for the specified registry keys.
/// A semicolon-separated list of registry key paths, for view access control.
// Token: 0x170009EC RID: 2540
// (get) Token: 0x06003285 RID: 12933 RVA: 0x000ADCDC File Offset: 0x000ABEDC
// (set) Token: 0x06003286 RID: 12934 RVA: 0x000ADCE4 File Offset: 0x000ABEE4
public string ViewAccessControl
{
get
{
return this.viewAccessControl;
}
set
{
this.viewAccessControl = value;
}
}
/// Gets or sets a specified set of registry keys that can be viewed and modified.
/// A semicolon-separated list of registry key paths, for create, read, and write access.
/// The get accessor is called; it is only provided for C# compiler compatibility.
// Token: 0x170009ED RID: 2541
// (get) Token: 0x06003287 RID: 12935 RVA: 0x000ADCF0 File Offset: 0x000ABEF0
// (set) Token: 0x06003288 RID: 12936 RVA: 0x000ADCF8 File Offset: 0x000ABEF8
public string ViewAndModify
{
get
{
throw new NotSupportedException();
}
set
{
this.create = value;
this.read = value;
this.write = value;
}
}
/// Creates and returns a new .
/// A that corresponds to this attribute.
// Token: 0x06003289 RID: 12937 RVA: 0x000ADD10 File Offset: 0x000ABF10
public override IPermission CreatePermission()
{
RegistryPermission registryPermission;
if (base.Unrestricted)
{
registryPermission = new RegistryPermission(PermissionState.Unrestricted);
}
else
{
registryPermission = new RegistryPermission(PermissionState.None);
if (this.create != null)
{
registryPermission.AddPathList(RegistryPermissionAccess.Create, this.create);
}
if (this.read != null)
{
registryPermission.AddPathList(RegistryPermissionAccess.Read, this.read);
}
if (this.write != null)
{
registryPermission.AddPathList(RegistryPermissionAccess.Write, this.write);
}
}
return registryPermission;
}
// Token: 0x040014BB RID: 5307
private string create;
// Token: 0x040014BC RID: 5308
private string read;
// Token: 0x040014BD RID: 5309
private string write;
// Token: 0x040014BE RID: 5310
private string changeAccessControl;
// Token: 0x040014BF RID: 5311
private string viewAccessControl;
}
}