Bewerken

Share via


CodeGroup(IMembershipCondition, PolicyStatement) Constructor

Definition

Initializes a new instance of CodeGroup.

protected:
 CodeGroup(System::Security::Policy::IMembershipCondition ^ membershipCondition, System::Security::Policy::PolicyStatement ^ policy);
public:
 CodeGroup(System::Security::Policy::IMembershipCondition ^ membershipCondition, System::Security::Policy::PolicyStatement ^ policy);
protected CodeGroup (System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy);
public CodeGroup (System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy);
new System.Security.Policy.CodeGroup : System.Security.Policy.IMembershipCondition * System.Security.Policy.PolicyStatement -> System.Security.Policy.CodeGroup
Protected Sub New (membershipCondition As IMembershipCondition, policy As PolicyStatement)
Public Sub New (membershipCondition As IMembershipCondition, policy As PolicyStatement)

Parameters

membershipCondition
IMembershipCondition

A membership condition that tests evidence to determine whether this code group applies policy.

policy
PolicyStatement

The policy statement for the code group in the form of a permission set and attributes to grant code that matches the membership condition.

Exceptions

The membershipCondition parameter is null.

The type of the membershipCondition parameter is not valid.

-or-

The type of the policy parameter is not valid.

Remarks

This constructor creates a basic code group and should be called from the constructors of custom code groups. You can add child code groups using the AddChild method.

Applies to