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

RegistryPermissionAttribute

Allows security actions for RegistryPermission to be applied to code using declarative security. This class cannot be inherited.
public string All { get; set; }

Gets or sets full access for the specified registry keys.

public string ChangeAccessControl { get; set; }

Gets or sets change access control for the specified registry keys.

public string Create { get; set; }

Gets or sets create-level access for the specified registry keys.

public string Read { get; set; }

Gets or sets read access for the specified registry keys.

public string ViewAccessControl { get; set; }

Gets or sets view access control for the specified registry keys.

public string ViewAndModify { get; set; }

Gets or sets a specified set of registry keys that can be viewed and modified.

public string Write { get; set; }

Gets or sets write access for the specified registry keys.

Initializes a new instance of the RegistryPermissionAttribute class with the specified SecurityAction.