ポリシー レベルのルート コード グループを取得または設定します。
Public Property RootCodeGroup As CodeGroup
[C#]
public CodeGroup RootCodeGroup {get; set;}
[C++]
public: __property CodeGroup* get_RootCodeGroup();public: __property void set_RootCodeGroup(CodeGroup*);
[JScript]
public function get RootCodeGroup() : CodeGroup;public function set RootCodeGroup(CodeGroup);
プロパティ値
ポリシー レベル コード グループのツリーのルートである CodeGroup 。
解説
すべてのポリシー レベルには、1 つのルート CodeGroup があります。
使用例
[Visual Basic, C#, C++] 各ポリシー レベル内のルート CodeGroup が使用する、メンバシップ条件の型を書き込む例を次に示します。
'Write out type of membership condition of root code group in all policy levels.
Dim levels As IEnumerator = SecurityManager.PolicyHierarchy()
While levels.MoveNext()
Dim level As PolicyLevel = CType(levels.Current, PolicyLevel)
Console.WriteLine("Policy Level: {0}", level.Label)
Dim group As CodeGroup = level.RootCodeGroup
Console.WriteLine(ControlChars.Tab + "Root CodeGroup type: {0}", _
group.MembershipCondition.ToString())
End While
[C#]
//Write out type of membership condition of root code group in all policy levels.
IEnumerator levels = SecurityManager.PolicyHierarchy();
while (levels.MoveNext()) {
PolicyLevel level = (PolicyLevel)levels.Current;
Console.WriteLine ("Policy Level: {0}", level.Label);
CodeGroup group = level.RootCodeGroup;
Console.WriteLine ("\tRoot CodeGroup type: {0}",
group.MembershipCondition.ToString());
}
[C++]
//Write out type of membership condition of root code group in all policy levels.
IEnumerator* levels = SecurityManager::PolicyHierarchy();
while (levels->MoveNext()) {
PolicyLevel* level = dynamic_cast<PolicyLevel*>(levels->Current);
Console::WriteLine (S"Policy Level: {0}",level->Label);
CodeGroup* group = level->RootCodeGroup;
Console::WriteLine (S"\tRoot CodeGroup type: {0}",group->MembershipCondition);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
PolicyLevel クラス | PolicyLevel メンバ | System.Security.Policy 名前空間