Edit

Share via


GacIdentityPermissionAttribute(SecurityAction) Constructor

Definition

Initializes a new instance of the GacIdentityPermissionAttribute class with the specified SecurityAction value.

public:
 GacIdentityPermissionAttribute(System::Security::Permissions::SecurityAction action);
public GacIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action);
new System.Security.Permissions.GacIdentityPermissionAttribute : System.Security.Permissions.SecurityAction -> System.Security.Permissions.GacIdentityPermissionAttribute
Public Sub New (action As SecurityAction)

Parameters

action
SecurityAction

One of the SecurityAction values.

Exceptions

The action parameter is not a valid SecurityAction value.

Remarks

The constructor calls the base class to validate the SecurityAction value.

This constructor associates a SecurityAction (for example, Demand) with the GacIdentityPermission.

The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. Use GacIdentityPermission for imperative security.

Applies to