共用方式為


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

程式碼群組的原則陳述式,形式為要授與符合成員資格條件的程式碼之使用權限集合和屬性 (Attribute)。

例外狀況

membershipCondition 參數為 null

membershipCondition 參數的型別無效。

-或-

policy 參數的型別無效。

備註

此建構函式會建立基本程式代碼群組,而且應該從自定義程式代碼群組的建構函式呼叫。 您可以使用 方法新增子程式代碼群組 AddChild

適用於