RegistryPermissionAccess 枚举

定义

注意

Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}

指定允许的对注册表项和值的访问权。Specifies the permitted access to registry keys and values.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class RegistryPermissionAccess
[System.Flags]
public enum RegistryPermissionAccess
[System.Flags]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum RegistryPermissionAccess
[System.Flags]
[System.Serializable]
public enum RegistryPermissionAccess
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum RegistryPermissionAccess
[<System.Flags>]
type RegistryPermissionAccess = 
[<System.Flags>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type RegistryPermissionAccess = 
[<System.Flags>]
[<System.Serializable>]
type RegistryPermissionAccess = 
[<System.Flags>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type RegistryPermissionAccess = 
Public Enum RegistryPermissionAccess
继承
RegistryPermissionAccess
属性

字段

AllAccess 7

对注册表变量的 CreateReadWrite 访问权限。Create, Read, and Write access to registry variables. AllAccess 表示多个 RegistryPermissionAccess 值,如果将它用作 ArgumentException 方法的 access 参数(它需要单一值),则引发 GetPathList(RegistryPermissionAccess)AllAccess represents multiple RegistryPermissionAccess values and causes an ArgumentException when used as the access parameter for the GetPathList(RegistryPermissionAccess) method, which expects a single value.

Create 4

可以创建注册表变量。Create access to registry variables.

NoAccess 0

没有对注册表变量的访问权限。No access to registry variables. NoAccess 不表示有效的 RegistryPermissionAccess 值,如果将它用作 ArgumentException 的参数(它需要单一值),则引发 GetPathList(RegistryPermissionAccess)NoAccess represents no valid RegistryPermissionAccess values and causes an ArgumentException when used as the parameter for GetPathList(RegistryPermissionAccess), which expects a single value.

Read 1

可以读注册表变量。Read access to registry variables.

Write 2

可以写注册表变量。Write access to registry variables.

注解

RegistryPermissionAccess 值是独立的;对一种类型的访问权限的权限并不意味着对另一种访问权限。RegistryPermissionAccess values are independent; rights to one type of access do not imply rights to another. 例如, Write 权限不表示对或的权限 Read CreateFor instance, Write permission does not imply permission to Read or Create.

备注

尽管 NoAccessAllAccess 出现在中 RegistryPermissionAccess ,但它们不能用作的参数, RegistryPermission.GetPathList 因为它们分别描述了注册表变量访问类型或所有注册表变量访问类型,并且 GetPathList 需要一个注册表变量访问类型。Although NoAccess and AllAccess appear in RegistryPermissionAccess, they are not valid for use as the parameter for RegistryPermission.GetPathList because they describe no registry variable access types or all registry variable access types, respectively, and GetPathList expects a single registry variable access type.

适用于

另请参阅