CodeGroup(IMembershipCondition, PolicyStatement) 构造函数

定义

初始化 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)

参数

membershipCondition
IMembershipCondition

成员条件,它测试证据以确定此代码组是否应用策略。

policy
PolicyStatement

形式为权限集和特性的代码组的策略声明,这些权限集和特性将被授予匹配成员条件的代码。

例外

membershipCondition 参数为 null

membershipCondition 参数的类型无效。

- 或 -

policy 参数的类型无效。

注解

此构造函数创建一个基本代码组,应从自定义代码组的构造函数调用。 可以使用 方法添加子代码组 AddChild

适用于