CodeGroup(IMembershipCondition, PolicyStatement) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 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
。
備註
此建構函式會建立基本程式代碼群組,而且應該從自定義程式代碼群組的建構函式呼叫。 您可以使用 方法新增子程式代碼群組 AddChild 。