SecurityManager.PolicyHierarchy 方法

定义

注意

现已弃用此 API。

注意

This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

提供一个枚举器,用于按级别(例如计算机策略和用户策略)访问安全策略层次结构。

public:
 static System::Collections::IEnumerator ^ PolicyHierarchy();
[System.Obsolete]
public static System.Collections.IEnumerator PolicyHierarchy();
public static System.Collections.IEnumerator PolicyHierarchy();
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Collections.IEnumerator PolicyHierarchy();
[<System.Obsolete>]
static member PolicyHierarchy : unit -> System.Collections.IEnumerator
static member PolicyHierarchy : unit -> System.Collections.IEnumerator
[<System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member PolicyHierarchy : unit -> System.Collections.IEnumerator
Public Shared Function PolicyHierarchy () As IEnumerator

返回

构成安全策略层次结构的对象枚举器 PolicyLevel

属性

例外

此方法使用代码访问安全性 (CAS) 策略,该策略在 .NET Framework 4 中已过时。 若要启用 CAS 策略以与早期版本的 .NET Framework 兼容,请使用 <legacyCasPolicy> 元素

调用此方法的代码没有 ControlPolicy

注解

返回的枚举器提供连续 PolicyLevel 对象,这些对象表示层次结构的相应级别(计算机、用户、企业、应用程序域)级别的策略。 这些对象是实时策略对象;更改这些对象可能会产生不可预知的结果。

最低策略层次结构由计算机级别、企业级别和用户级别组成。 但是,层次结构可以包含其他级别。

适用于