SecurityManager.SavePolicyLevel(PolicyLevel) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
现已弃用此 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.
保存用 LoadPolicyLevelFromFile(String, PolicyLevelType) 加载的已修改的安全策略级别。
public:
static void SavePolicyLevel(System::Security::Policy::PolicyLevel ^ level);
[System.Obsolete]
public static void SavePolicyLevel (System.Security.Policy.PolicyLevel level);
public static void SavePolicyLevel (System.Security.Policy.PolicyLevel level);
[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 void SavePolicyLevel (System.Security.Policy.PolicyLevel level);
[<System.Obsolete>]
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
[<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 SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
Public Shared Sub SavePolicyLevel (level As PolicyLevel)
参数
- level
- PolicyLevel
要保存的策略级别对象。
- 属性
例外
调用此方法的代码不含 ControlPolicy。
此方法使用代码访问安全性 (CAS) 策略,该策略在.NET Framework 4 中已过时。 若要使 CAS 策略与早期版本的 .NET Framework 兼容,请使用 <legacyCasPolicy> 元素。
注解
PolicyLevel将保存到从中加载它的同一位置。