CodeGroup(IMembershipCondition, PolicyStatement) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.