RegistryCodeGroup Class

Namespace: System.Net.Security.CAS

Summary

Represents a code group that is based on a registry key. Code groups are used by the Code Access Security (CAS) system to grant code permissions.

! Note: Code Access Security (CAS) is a legacy feature that is not recommended for use in new applications.

Syntax


public sealed class RegistryCodeGroup : CodeGroup
                

Inheritance Hierarchy

System.Object
System.Security.Policy.CodeGroup
System.Net.Security.CAS.RegistryCodeGroup

Remarks

A RegistryCodeGroup is a type of code group that uses a registry key to determine whether assembly code should be granted permissions. This is typically used in environments where specific assemblies are registered in the Windows Registry, and their presence there indicates they should receive a certain set of permissions.

The CAS system evaluates code groups by traversing the policy hierarchy. When the system encounters a RegistryCodeGroup, it checks for the presence and validity of the associated registry key. If the conditions are met, the code group's membership condition is satisfied, and the associated permissions are granted.

Constructors

Name Description
RegistryCodeGroup(System.Security.Policy.IMembershipCondition, System.Security.Policy.PolicyStatement) Initializes a new instance of the RegistryCodeGroup class with the specified membership condition and policy statement.

Methods

Name Description
Copy() Creates a new code group and adds it to the current code group.
Parse(System.Security.SecurityElement) Parses the specified SecurityElement and returns a code group object.
Resolve(System.Security.Policy.Evidence) Resolves the permissions for the specified evidence.
ToString() Returns a string representation of the current code group.

Fields

Name Description
RegistryKeyMembershipConditionType Gets the type of the membership condition associated with a RegistryCodeGroup.