<PackageReference Include="System.Security.Permissions" Version="10.0.0-preview.3.25171.5" />

RegistryPermission

Controls the ability to access registry variables. This class cannot be inherited.

Initializes a new instance of the RegistryPermission class with either fully restricted or unrestricted permission as specified.

public RegistryPermission(RegistryPermissionAccess access, AccessControlActions control, string pathList)

Initializes a new instance of the RegistryPermission class with the specified access to the specified registry variables and the specified access rights to registry control information.

public RegistryPermission(RegistryPermissionAccess access, string pathList)

Initializes a new instance of the RegistryPermission class with the specified access to the specified registry variables.

public void AddPathList(RegistryPermissionAccess access, string pathList)

Adds access for the specified registry variables to the existing state of the permission.

public void AddPathList(RegistryPermissionAccess access, AccessControlActions actions, string pathList)

Adds access for the specified registry variables to the existing state of the permission, specifying registry permission access and access control actions.

public string GetPathList(RegistryPermissionAccess access)

Gets paths for all registry variables with the specified RegistryPermissionAccess.

public bool IsUnrestricted()

Returns a value indicating whether the current permission is unrestricted.

public void SetPathList(RegistryPermissionAccess access, string pathList)

Sets new access for the specified registry variable names to the existing state of the permission.